Xref: utzoo comp.unix.shell:1443 comp.unix.programmer:1040 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!swrinde!zaphod.mps.ohio-state.edu!magnus.ircc.ohio-state.edu!tut.cis.ohio-state.edu!pacific.mps.ohio-state.edu!linac!att!news.cs.indiana.edu!nstn.ns.ca!cs.dal.ca!david From: david@cs.dal.ca (David Trueman) Newsgroups: comp.unix.shell,comp.unix.programmer Subject: Re: printing from awk into the stderr Keywords: awk Message-ID: <1991Feb10.012401.867@cs.dal.ca> Date: 10 Feb 91 01:24:01 GMT References: <728@mlacus.oz> <785@rubikon.UUCP> <1991Feb09.065958.22874@convex.com> Organization: Math, Stats & CS, Dalhousie University, Halifax, NS, Canada Lines: 20 In article <1991Feb09.065958.22874@convex.com> tchrist@convex.COM (Tom Christiansen) writes: |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, Gawk fakes the support. |not awk. And the syntax really should be: | | print "foo bar" > "/dev/stderr" Right. -- {uunet watmath}!dalcs!david or david@cs.dal.ca