PDA

View Full Version : Problem with piping and exit statuses



altonbr
March 18th, 2008, 04:48 PM
rm -r $HOME/.Trash | zenity --progress --title="Secure Delete" --pulsate --auto-kill --auto-close ; echo $?

will return 0.


rm -r $HOME/.Trash ; echo $?

will return 1.

Is there anyway I can test the exit status ($?) of my 'rm' command while piping to zenity?