execline
Software
www.skarnet.org
The if program
if performs conditional execution.
Interface
if [ -n ] [ -t ] ~prog1... ; prog2...
or in an execlineb script:
if [ -n ] [ -t ] { prog1... } prog2...
- if reads prog1... in a
block. It forks and executes it,
then waits for it to complete.
- If prog1 crashes, or exits a non-zero status,
if exits 1 (0 if the -t option is used).
- Else if execs into prog2.
Options
- -n : negate the test.
- -t : exit 0 , not 1, if the test evaluates to false.
Notes