delta407 Bodhisattva
Joined: 23 Apr 2002 Posts: 2876 Location: Chicago, IL
|
Posted: Fri Jun 21, 2002 12:54 am Post subject: |
|
|
command > file tells the shell to take the "standard output" stream and pipe it to a file. However, there is another stream -- stderr -- that programs often write errors to. Both appear on the screen, but > file only takes stdout. So, to pipe both of them to the same place, write:
Code: | command > file 2>&1 |
You could even redirect them to separate locations:
Code: | command >stdout 2>stderr |
(If no number is left of >, a 1 is implied, meaning stdout. So, if you ever see that, that's what's up.) |
|