2004-06-10, 05:49(-07), rakesh sharma:
>> > shopt -s nullglob
>> You could also do:
>> cat /dev/null ./*.x
> hi Stephane
> Can you explain the rationale for the above? If some dir. ends in .x how
> would it handle that? what is the function of /dev/null?
The above supposed the nullglob bash option was on.
This way, if there's no .x file, the command resolves to
that does nothing.
Without the /dev/null, it would resolve to:
that reads stdin.
Sorry, my post was not clear.