help-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Help-bash] Redirecting output to stderr


From: Marlen Caemmerer
Subject: [Help-bash] Redirecting output to stderr
Date: Sat, 15 Nov 2014 22:31:34 +0100 (CET)
User-agent: Alpine 2.00 (DEB 1167 2008-08-23)

Hello,

I tried to output a echo to stderr.
Unfortunatelly it does not go to stderr but to stdout.
Only when I use it in a function it works.
When I put the first statement into a script it works as expected, too.

It works in zsh though and I guess it worked in 2003 in bash, too.
Here is my shell output:

address@hidden:~$
address@hidden:~$ echo "moo" 1>&2 > /dev/null
address@hidden:~$ echo "moo" 1>&2
moo
address@hidden:~$ echoerr() { echo "$@" 1>&2; }; echoerr "moo" > /dev/null
moo
address@hidden:~$

But I have no idea why it is so and if this is a bug.

Cheers
        nosy

--
     *          Marlen Caemmerer
       *        Richard-Sorge-Str. 82
monoro   *      10249 Berlin
       *
     *          Tel: 0179/733 90 72
                USt-ID: DE 252684276




reply via email to

[Prev in Thread] Current Thread [Next in Thread]