Software
skarnet.org
execline
What is it?
execline is a (non-interactive) scripting language, like sh -
but its syntax is quite different from a traditional shell syntax.
The execlineb program is meant to be used as an interpreter for a
text file; the other commands are essentially useful inside an
execlineb script.
execline is as powerful as a shell: it features
conditional loops,
getopt-style option handling,
filename globbing, and more.
Meanwhile, its syntax is far more logical and predictable than the
shell's syntax, and has no security issues.
Installation
Requirements
- A POSIX-compliant system with a standard C development environment
- GNU make, version 3.81 or later.
- skalibs version
2.14.4.0 or later. It's a build-time requirement. It's also a run-time
requirement if you link against the shared version of the skalibs
library.
The following optional dependencies are also supported:
- If you're using musl and
want nsswitch-like functionality:
nsss version
0.2.1.0 or later (build-time and boot-time)
Licensing
execline is free software. It is available under the
ISC license.
Download
Compilation
- See the enclosed INSTALL file for installation details.
- Starting with 2.9.2.0, there's an --enable-multicall
configure option to save disk space.
Upgrade notes
- This page lists the differences to be aware of between
the previous versions of execline and the current one.
Reference
Commands
All these commands exit 111 if they encounter a temporary error, and
100 if they encounter a permanent error - such as a misuse. They exit
127 if they're trying to execute into a program and cannot find it, and
126 if they fail to execute into a program for another reason.
(Script parser / launcher)
(Process state control)
(Basic block management)
(Variable management)
(Loops)
(Positional parameters and options management)
(Miscellaneous)
(Multicall configuration)
Provided scripts: example .profile replacement
Fun stuff
- An execline quine. This was quinely provided by
Joël Riou. The only
external command used is echo.
- Another quine, provided by
Paul Jarc. It is much shorter, but
uses the external commands echo and env. Later, Paul rewrote
it using only echo, then
using only echo and the environment.
- Another quine, provided by
David Madore. It uses the
external command printf. It is longer, but quite stylish.
- Another quine, provided by Sertonix.
This one only uses commands from the execline package, and no external
commands!
Related resources
execline manual pages
execline discussion
- execline is discussed on the
skaware mailing-list.