On Thursday, February 20, 2003, at 01:20 PM, Marcus Bointon wrote:

This is something I see every now and again that I don't quite understand.
Some commands have something that looks like a redirection, but doesn't seem
to make any sense to me, for example (during a build of the jpeg6b library):

gcc -O2 -I/sw/include -I. -c ./wrjpgcom.c -o wrjpgcom.o >/dev/null 2>&1
Ignore that it's gcc etc, what does the "2>&1" at the end mean/do exactly?
redirects the 2nd filehandle to the 1st. In shell, 1 = STDOUT (text to the screen), 2 = STDERR (errors to the screen)

in this particular case, you're redirecting output to /dev/null, and then errors to the "regular" output, which ends up going to /dev/null as well.



-------------------------------------------------------
This SF.net email is sponsored by: SlickEdit Inc. Develop an edge.
The most comprehensive and flexible code editor you can use.
Code faster. C/C++, C#, Java, HTML, XML, many more. FREE 30-Day Trial.
www.slickedit.com/sourceforge
_______________________________________________
Fink-beginners mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/fink-beginners


Reply via email to