|
|||||||||
| Shell Programming and Scripting BSD, Linux, and UNIX shell scripting — Post awk, bash, csh, ksh, perl, php, python, sed, sh, shell scripts, and other shell scripting languages questions here. |
unix and linux operating commands |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Confusion about 1>&2 and 2>&1
Can anybody tell me the difference between 1>&2 and 2>&1?
|
| The Following User Says Thank You to navi For This Useful Post: | ||
munnangi (05-18-2012) | ||
| Sponsored Links | ||
|
|
#2
|
||||
|
||||
|
1 is stdout 2 is stderr
By default stdout is the "normal" stream for program out, stderr is for errors and warnings only. Both of those statments combine stdout and stderr into one stream - the first places all stderr and stdout output on 2, the second places all output on 1 |
| Sponsored Links | ||
|
|
![]() |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Confusion about IFS Variable | Awadhesh | Shell Programming and Scripting | 7 | 03-05-2008 06:28 AM |
| 'tr' confusion | Nafanja | UNIX for Dummies Questions & Answers | 2 | 12-05-2007 11:47 PM |
| Sed confusion | alfredo123 | Shell Programming and Scripting | 3 | 11-17-2006 12:16 PM |
| ftp confusion | intern | UNIX for Dummies Questions & Answers | 1 | 06-08-2006 07:20 PM |
| ISO Confusion? | Mr_Pinky | UNIX for Dummies Questions & Answers | 6 | 09-19-2005 07:14 PM |
|
|