This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: Arguments after shell redirection not before?
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Paul Eggert <eggert at cs dot ucla dot edu>
- Cc: GNU C Library <libc-alpha at sourceware dot org>
- Date: Sun, 05 May 2013 15:38:18 -0400
- Subject: Re: Arguments after shell redirection not before?
- References: <51869056 dot 90109 at redhat dot com> <5186AD2A dot 807 at cs dot ucla dot edu>
On 05/05/2013 03:04 PM, Paul Eggert wrote:
> On 05/05/2013 10:01 AM, Carlos O'Donell wrote:
>> When is the above useful?
>
> Sometimes the source code lines up better if
> the redirections come first. E.g.:
>
> printf 2>&1 "some message"
> ...
> printf 2>&1 "another message"
Oh, that's a good example. I'll have to remember that.
> It's a relatively minor style thing; I normally
> wouldn't bother normalizing the code to one style
> or the other.
>
> Anyway, it's not confusing to put
> the I/O redirections first. Since
> redirections are actually done before the
> arguments are passed, one could argue that it's
> even a bit clearer to put the redirections first.
>
Thanks, I don't plan to formalize any policy here,
I was just curious.
Cheers,
Carlos.