Saturday, October 13, 2012

General solution of output redirection

http://askubuntu.com/questions/75327/redirection-doesnt-work


http://www.mathinfo.u-picardie.fr/asch/f/MeCS/courseware/users/help/general/unix/redirection.html

>> Append standard output


Sometimes shell redirecting does not work (specifically - when one shell spawns another shell, I think:). Above is the generic solution that simply grabs all the shell output and places it into the file. In your case this should work as well, since you're expecting output on stdout/stderr.



  
script -c "/path/prog" /path/log.txt
 
script -c "Your Command" Filename.txt
  



No comments:

Post a Comment