On 2010-04-28 05:17, vefatica wrote:
> I never knew you could put redirection **anywhere** in the command line.
Yes, that has been possible since whenever redirection was invented. :)
A redirection operator binds to the first argument to the right of it,
and anything following it, is just appended to any existing command line
arguments.
E.g.:
grep -i foo < bar > baz
can also be specified as:
grep -i < bar > baz foo
or:
grep > baz < bar -i foo
etc. Maybe this is why some people prefer to splice the redirection
operator and its argument together without a space, to clarify these two
belong together, e.g.:
grep -i foo <bar >baz