* Question

Doug Gwyn gwyn at smoke.BRL.MIL
Thu Dec 1 05:22:31 AEST 1988


In article <17661 at adm.BRL.MIL> wmartin at almsa-1.arpa (Will Martin -- AMXAL-RI) writes:
>cat foo > /data/sa*/bar

>What I don't understand is why the expansion doesn't work under "sh".

It was a deliberate design decision.  The target of > should be just one
word, not the potential multiple words that wildcard expansion might
produce.  To avoid unpleasant surprises, "sh" doesn't expand wildcards
in such contexts.

However, note that you can save typing using the BRL Bourne shell by
using the filename completion feature to automatically fill in the
rest of a pathname segment once you've typed the unambiguous prefix
for it.  I actually prefer this approach anyway, since I get to see
the full expansion before the command is executed.



More information about the Comp.unix.questions mailing list