execline
Software
skarnet.org
The forx program
forx runs a loop.
Interface
In an execlineb script:
forx [ -p | -x breakcodes ] variable { args... } loop...
- forx reads a
block and unquotes it.
That block contains a list of args.
- For each argument x in args...,
forx runs loop as a child process, with
variable=x added to its environment.
- forx then exits 0.
Options
- -p : run in parallel. Do not wait for an instance of
loop... to exit before spawning the next one. forx
will still wait for all instances of loop to terminate before
exiting, though.
- -x breakcodes : breakcodes must
be a comma-separated list of exit codes. If the -p flag
hasn't been given and loop exits with one of the codes in breakcodes,
forx will not run the following instances of the loop, but exit immediately with the
same exit code.
Notes
- You can start loop with "import -u variable"
if you want variable substitution.