TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Thomas Seeling
from: Sam Mertens
date: 1996-07-05 00:20:24
subject: Command-line redirection

TS> This is wrong in case of cc=emx+gcc. You would have 
 TS> known this by reading the FAQ. gcc prints its error 
 TS> messages to stderr, so redirection is done with

 TS> gcc hallo.c 2> hallo.err

 TS> This is possible at least with 4os2 and ksh. The 
 TS> FAQ tells that cmd.exe cannot do this and provides 
 TS> an utility program called redir for this purpose.
 
Perhaps I'm misunderstanding you, but cmd.exe is quite capable of what
you're describing.  (In fact, DOS's command.com is too.)  To redirect
standard output use '> outfile' or '1> outfile'.  To redirect stderr
output, use '2> outfile.err'.  This sends all output to file handle 1
(the same value predefined for stdout) to the file 'outfile', and all
output to file handle 2 (the value predefined for stderr) to file
'outfile.err'.
 
Hmm.  I don't like my explanation much, but it'll have to do for the moment.

--- Maximus/2 2.02
* Origin: OS/2 Shareware BBS, telnet://bbs.os2bbs.com (1:109/347)
SEEN-BY: 50/99 270/101 620/243 625/100 711/401 409 410 413 430 808 809 934
SEEN-BY: 711/955 712/407 515 517 628 713/888 800/1
@PATH: 109/347 18 13/25 396/1 270/101 712/515 711/808 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.