Xref: utzoo comp.unix.shell:1439 comp.unix.programmer:1034 Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!nstn.ns.ca!news.cs.indiana.edu!sdd.hp.com!cs.utexas.edu!convex!news From: tchrist@convex.COM (Tom Christiansen) Newsgroups: comp.unix.shell,comp.unix.programmer Subject: Re: printing from awk into the stderr Keywords: awk Message-ID: <1991Feb09.065958.22874@convex.com> Date: 9 Feb 91 06:59:58 GMT References: <728@mlacus.oz> <785@rubikon.UUCP> Sender: news@convex.com (news access account) Reply-To: tchrist@convex.COM (Tom Christiansen) Organization: CONVEX Software Development, Richardson, TX Lines: 19 Nntp-Posting-Host: pixel.convex.com From the keyboard of toad@rubikon.UUCP (Peter Cleve): :>Is it possible to "print" from awk to the stderr? : :The standart (and portable) solution is : : print "foo bar" | "cat 1>&2" :In nawk (comes with newer unix releases) or with gawk you can try : : print "foo bar" > /dev/stderr You can only do that if you the system itself supports /dev/stderr, not awk. And the syntax really should be: print "foo bar" > "/dev/stderr" I would say there are a LOT of systems that don't support both nawk and /dev/stderr. But I guess it's nice if you have it. --tom -- "All things are possible, but not all expedient." (in life, UNIX, and perl)