Hi, I have seen the use of 2>&1 to seperate redirection of System.err and System.out. Can someone please explain me how I can achieve the following on Windows NT and UNIX I have a programme which has two statements, one is System.out, and other System.err i want the System.err redirected to a file and system.out to continue on the console .. can someone tell me how do i invoke the command line for e.g. javaTest 2> out.txt ?? etc.. ? also what does '2' '&' '1' mean ???
<BR>Rahul Dighe
Maulin Vasavada
Ranch Hand
Joined: Nov 04, 2001
Posts: 1863
posted
0
hi Rahul, so what you are trying to do? i'm not clear i think. u seem to already know how to redirect the stderr to the file. then what is the question? do u want something similar on Win NT? as far as 2,& and 1 description is concerned, In unix 0 = Standard input file descriptor (stdin) 1 = Standard output file descriptor (stdout) 2 = Standard error file descriptor (stderr) when you say 2>&1 it means that stderr should be redirected to stdout. ie. all System.err.println() output gets print on Stdout. also this might be helpful... regards maulin.