- To: slug-chat@xxxxxxxxxxx
- Subject: [slug-chat] Script challenge with tee
- From: waratah@xxxxxxxxxx
- Date: Thu Apr 19 12:00:05 2001
I have a problem, I want to tee and still get the return code:
prog x y z | tee
echo $?
Will always show zero because this is the return code of tee. I need the
return value of prog.
{
prog x y z
echo $?
} | tee
works but I want to capture the values so that I can exit much later with the
value of this program.
{
prog x y z
RC=$?
} | tee
lp ...
exit $RC
RC is does not appear to be available to the script.
Any suggestions?
KenF
---------------------------------------------
This message was sent using Endymion MailMan.
http://www.endymion.com/products/mailman/