This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Arguments after shell redirection not before?


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"

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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]