Back to UUOC (was: Shell tips and tricks)

Ben Scott dragonhawk at gmail.com
Fri Oct 5 17:21:44 EDT 2007


On 10/5/07, Lloyd Kvam <python at venix.com> wrote:
> < input
>
> does nothing by itself.

  I had to check.  Turns out that's not *quite* true.  "Nothing
useful" would be more appropriate.  But check this out:

blackfire$ ls foo
ls: foo: No such file or directory
blackfire$ < foo
-bash: foo: No such file or directory
blackfire$ > foo
blackfire$ ls foo
foo
blackfire$ < foo
blackfire$

  So it appears the shell actually does go through the motions of
opening the file for redirection, even though there is nothing to
redirect it to.

-- Ben


More information about the gnhlug-discuss mailing list