Marlen Caemmerer
2014-11-15 21:31:34 UTC
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:
***@all:~$
***@all:~$ echo "moo" 1>&2 > /dev/null
***@all:~$ echo "moo" 1>&2
moo
***@all:~$ echoerr() { echo "$@" 1>&2; }; echoerr "moo" > /dev/null
moo
***@all:~$
But I have no idea why it is so and if this is a bug.
Cheers
nosy
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:
***@all:~$
***@all:~$ echo "moo" 1>&2 > /dev/null
***@all:~$ echo "moo" 1>&2
moo
***@all:~$ echoerr() { echo "$@" 1>&2; }; echoerr "moo" > /dev/null
moo
***@all:~$
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
* Marlen Caemmerer
* Richard-Sorge-Str. 82
monoro * 10249 Berlin
*
* Tel: 0179/733 90 72
USt-ID: DE 252684276