[prog] echoing something to STDERR

Conor Daly conor.daly at oceanfree.net
Wed Nov 12 19:19:36 EST 2003


On Wed, Nov 12, 2003 at 11:57:03PM +1100 or so it is rumoured hereabouts, 
Jenn Vesperman thought:
> On Wed, 2003-11-12 at 07:20, Hamster wrote:
> > On Tue, 11 Nov 2003 21:14:39 +0100
> > Hamster <hamster at hamsternet.org> wrote:
> > 
> > > The problem with this is that echo plonks stuff on STDOUT, I want it to go
> > > to STDERR.
> 
> You can also try stuff like cat "foo.txt doesn't exist" > stderr.

I kinda like the alias route but I don't know the syntax.  

alias echoerr='echo $* >&2'

doesn't quite work.  The idea is that the '$*' should represent the arguments to
'echoerr'

Anyone know?


Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
  6:06pm  up 20 days, 11:15,  0 users,  load average: 0.00, 0.09, 0.16
Hobbiton.cod.ie
  6:04pm  up 20 days, 11:14,  1 user,  load average: 0.00, 0.00, 0.00


More information about the Programming mailing list