Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Error output from cmd prompt

Status
Not open for further replies.

xwb

Programmer
Joined
Jul 11, 2002
Messages
6,828
Location
GB
When running programs, I sometimes use

xxx 1> xxx.log 2>&1

From the cmd prompt, all echos go to output 1 and all errors go to output 2.
In a C program, output 1 is stdout and output 2 is stderr.
From a batch script, is it possible to write to output 2?
 
echo message 1>&2

Thanks.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top