execline
Software
skarnet.org
The && program
&& performs conditional execution.
Interface
In an execlineb script:
&& [ -X ] [ -n ] [ -t | -x exitcode ] { prog1... } prog2...
- && reads prog1... in a
block. It forks and executes it,
then waits for it to complete.
- If prog1 crashes, && prints an error message
then exits 128 plus the number of the signal that killed prog1.
- If prog1 exits a non-zero status,
&& exits 1.
- Else && execs into prog2.
Options
- -X : treat a crash of prog1 as a non-zero ("false") exit.
- -n : negate the test (exit on true, exec into prog2 on false)
- -x exitcode : exit exitcode instead of 1 if the test fails.
- -t : exit 0 instead of 1 if the test fails.
This is equivalent to -x 0.
Notes