Le lun 21 fév 2011 10:31:38 CET, James Bensley a écrit:
I'm stuck trying to work this one out and my Google skills are apparently lacking today.
This is a test bash script;
#!/bin/bash
do something | tee a.log
if [ $? -ne 0]; then echo broken fi
What about :
{ do something ; RETCODE=$? ; } | tee somefile echo $RETCODE