Extended shell linker
Find a file
2020-11-13 15:19:47 +01:00
include Performance optimizations 2020-11-13 15:18:30 +01:00
src fix incorrect include 2020-11-13 15:19:47 +01:00
.gitignore Extend options 2020-08-28 14:46:42 +02:00
LICENSE Initial commit 2020-08-28 10:46:02 +02:00
Makefile Fix ubuntu static build 2020-09-08 11:01:39 +02:00
README.md Improve direct execution 2020-09-02 12:03:07 +02:00

lxsh

Extended shell linker for linking and generating shell code

Features

Command extensions

lxsh implements special linking commands that are resolved at linking. These commands can be placed anywhere within the script like regular commands.

  • %include : allows to insert file contents
  • %resolve : allows to execute a shell command and insert its output

See lxsh --help-commands for more details

Other features

Output generated code

Output the generated shell code to stdout with either:

  • -o option
  • shebang other than lxsh

Redirect stdout to a file to create a script file.
The resulting script is not dependent on lxsh

Live execution

Directly execute an extended shell script with either

  • -e option
  • shebang is lxsh

Direct execution introduces direct dependency on lxsh and overhead, therefore it should be avoided outside of development use

Minimize code

Reduce code size to minimum without changing functionality with the -m option.

Work in progress

lxsh should currently fully support POSIX syntax.
A POSIX shell script should give a working output.

Some specific features are missing:

  • link commands in subshells inside arithmetics are not resolved
  • arithmetics cannot be minimized
  • link commands placed on the same line as keywords if, then, elif, else, for, while, do or done are not resolved