help-bash
[Top][All Lists]
Advanced

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

Re: [Help-bash] Redirecting output to stderr


From: Jason Ferrer
Subject: Re: [Help-bash] Redirecting output to stderr
Date: Sun, 16 Nov 2014 07:06:44 +0800

http://mywiki.wooledge.org/BashFAQ/055

On Sun, Nov 16, 2014 at 5:31 AM, Marlen Caemmerer <address@hidden>
wrote:

> 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
>
>
>


-- 
"Unfortunately time is always against us"


reply via email to

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