chop (my $status = `((make -f $params 2>&1 3>&-; echo \$? >&3 ) | tee +-a build.log 1>&2 3>&- ) 3>&1`); print "make exit status: $status\n";
update: added backslash to escape $?
--shmem
_($_=" "x(1<<5)."?\n".q·/)Oo. G°\ /
/\_¯/(q /
---------------------------- \__(m.====·.(_("always off the crowd"))."·
");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
In reply to Re: Capture Exit Code Using Pipe & Tee
by shmem
in thread Capture Exit Code Using Pipe & Tee
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |