I am trying to use tee to save the output to a file, for example:
myapp | tee log.txt
But I have a problem with checking the output. Previous code:
myapp if [ $? -eq 0 ] then .....
But $? there will be a way out of the tee! Is it possible to catch the exit from myapp? Thanks.
source share