Pathologically Eclectic Rubbish Lister | |
PerlMonks |
Re: Capture Exit Code Using Pipe & Teeby ambrus (Abbot) |
on Jan 31, 2007 at 22:14 UTC ( [id://597647]=note: print w/replies, xml ) | Need Help?? |
If your shell is bash, check out the PIPESTATUS shell parameter. For example, $command = "make -f <parameters> 2>&1 | tee -a build.log; let \\!PIPESTATUS"; might work, but I haven't tested it.
In Section
Seekers of Perl Wisdom
|
|