14
¥Pipes and Redirection
">   : redirect program output (stdout) to a file
"       e.g.  waver -help > waver.help
"                waver -pickle > waver.help
">&  : redirect all output (both stdout and stderr) to a file
"       e.g.  waver -pickle >& waver.pickle
"       e.g.  tcsh my.script >& script.output
"
">>  : append program output to a file
"
"|   : pipe standard output to the input of another program
"       e.g.  3dDeconvolve -help | less
"
"|&  : include stderr in the pipe
"       e.g.  tcsh my.big.script  |&  tee script.output
¥run the script
¥send all output to the tee program
¥the tee program duplicates the input, sending the output to both the terminal and the given file (script.output)
¥you can see the output, but it is also stored for future analysis