|
Search Forums:
|
|||||||
| Forums | Register | Forum Rules | Linux and Unix Links | Man Pages | Albums | FAQ | Users | Calendar | Search | Today's Posts | Mark Forums Read |
| UNIX and Linux Applications Discuss UNIX and Linux software applications. This includes SQL, Databases, Middleware, MOM, SOA, EDA, CEP, BI, BPM and similar topics. |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
|
Dear All, Code:
./waf --run scratch/myfirst > log.out 2>&1 The above is a command line to redirect the output to a file called log.out. what is the 2>&1 part for ? Thank you |
| Sponsored Links | |
|
|
|
#2
|
|||
|
|||
|
The syntax 2> instructs the shell to redirect standard error (file descriptor 2). The &1 is a reference to an open file descriptor (1) which is standard output. Therefore 2>&1 causes standard error to be redirected to the same file as standard output, so both stderr and stdout will be written, in your case, to log.out.
Last edited by agama; 02-04-2012 at 01:45 PM.. Reason: clarification |
| The Following User Says Thank You to agama For This Useful Post: | ||
knowledgeSeeker (02-04-2012) | ||
| Sponsored Links | ||
|
|
|
#3
|
|||
|
|||
|
oh alright Thanks !
|
| Sponsored Links | ||
|
|
![]() |
| Tags |
| c++, cmd, ns2, ns3 |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Output redirection | mfruiz34 | UNIX for Dummies Questions & Answers | 1 | 02-06-2011 12:56 PM |
| Help with tar --append command output redirection | pganguly46 | Shell Programming and Scripting | 0 | 02-01-2011 04:32 AM |
| Output redirection | jolateh | Shell Programming and Scripting | 5 | 01-20-2011 03:40 AM |
| Redirection output | kma07 | Shell Programming and Scripting | 6 | 05-12-2010 07:14 PM |
| redirection and output | nck | Shell Programming and Scripting | 2 | 10-23-2009 01:01 PM |
|
|