in reply to Using Perl to launch another Perl script and generate error log if it fails
$ cat run.sh #!/bin/sh S=p1.pl && p1.pl && S=p2.pl && p2.pl && S=p3.pl && p3.pl if [ $? = 0 ] then echo "all completed ok" else echo "$S failed" fi $ cat p?.pl #!/usr/bin/perl #exit with no error exit 0; #!/usr/bin/perl # exit with error exit 1; #!/usr/bin/perl #exit with no error exit 0; $ ./run.sh p2.pl failed
| Plankton: 1% Evil, 99% Hot Gas. |
|
|---|