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 SkipVought 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
Jul 11, 2002
6,828
0
36
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