The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
Google UNIX.COM


Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Confusion In run level... udayn SUN Solaris 1 02-16-2008 09:07 AM
'tr' confusion Nafanja UNIX for Dummies Questions & Answers 2 12-05-2007 08:47 PM
Sed confusion alfredo123 Shell Programming and Scripting 3 11-17-2006 09:16 AM
ftp confusion intern UNIX for Dummies Questions & Answers 1 06-08-2006 03:20 PM
ISO Confusion? Mr_Pinky UNIX for Dummies Questions & Answers 6 09-19-2005 03:14 PM

Reply
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 06-03-2008
Registered User
 

Join Date: Jun 2008
Posts: 12
Confusion about 1>&2 and 2>&1

Can anybody tell me the difference between 1>&2 and 2>&1?
Reply With Quote
Forum Sponsor
  #2  
Old 06-03-2008
...@...
 

Join Date: Feb 2004
Location: NM
Posts: 4,269
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
Reply With Quote
Google The UNIX and Linux Forums
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 02:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0