execline
Software
www.skarnet.org
The forx program
forx runs a loop.
Interface
forx [ -p | -x breakcode ] variable ~args... ; loop...
or in a execlineb script:
forx [ -p | -x breakcode ] variable { args... } loop...
- forx reads a
block and unquotes it.
That block contains a list of args.
- For each argument x in args...:
- forx performs
variable substitution
on loop..., with variable as key and x
as value. You cannot crunch, chomp or split x.
- It runs loop... as a child process.
- 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 breakcode : if the -p flag
hasn't been given and loop exits with the code breakcode,
do not run the following instances of the loop; exit immediately with the
same exit code.