Hi guys in the screen shot that guy used a command
what's the use of 2>&1 and why he has to use that ??Code:./test.shh 2>&1 |tee test.log
Hi guys in the screen shot that guy used a command
what's the use of 2>&1 and why he has to use that ??Code:./test.shh 2>&1 |tee test.log
redirects the standard error stream (stream 2) into the standard output stream (stream 1) - so error messages get combined with any other output from the commandCode:2>&1
A little Googling gave me this:
http://stackoverflow.com/questions/8...ell-what-is-21
Basically, 2>&1 means "redirect all output from stderr to stdout".
EDIT: Ninja'd!
Bookmarks