To redirect stderr to stdout we use 2 > &1. Why is it not just 2 > 1? why & is needed?
chappar
2009-06-09 18:16:34
because 2 in that case is not ambiguous
Benny Wong
2009-06-09 18:23:47
+3
A:
Because 2>1 would redirect to a file named "1". The & symbol specifies a stream rather than a file. The & symbol is not necessary for the 2 because the 2 is always a stream inidcator
Randolpho
2009-06-09 18:11:04