execline
Software
www.skarnet.org
The for program
for runs a loop, then another program.
Interface
for [ -p | -x breakcode ] variable ~args... ; ~loop... ; prog...
or in a execlineb script:
for [ -p | -x breakcode ] variable { args... } { loop... } prog...
- for reads two
blocks and unquotes them.
The first block contains a list of args, the second
one a loop... command.
- For each argument x in args...:
- for 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.
- for then execs into prog....
Options
- -p : run in parallel. Do not wait for an instance of
loop... to exit before spawning the next one.
- -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; exec prog
immediately.