Possible Duplicate:Show only stderr on screen but write both stdout and stderr to filestdout , stderr and logging using the script command cat test.sh:rm -v foo.tmpdatepwdcat test2.sh:script bar.log -c './test.sh'When executing test2.sh I would like to see the following for example on my terminal:Fri Feb 17 18:04:30 PST 2012  /home/me/meHowever in bar.log I would like to see:removed 'foo.tmp'  Fri Feb 17 18:04:30 PST 2012  /home/me/meor (in case foo.tmp does not exist)rm: cannot remove 'foo.tmp'  Fri Feb 17 18:04:30 PST 2012  /home/me/meIs this doable?
selective stdout , stderr and logging using the script command
bash;scripting;logs;stdout