Bash Hints: Redirecting StdErr to StdOut

One of the more annoying things about shell programming is when one has a program that spits the data to stderr.

program > file

You run that and you end up with spew in your terminal and nothing in your file. Annoying. If you want to make sure that everything makes it into the file, do your redirect like this.

program &> file

Related Posts:

This entry was posted in Programming and tagged , , , . Bookmark the permalink.

Comments are closed.