Strangeness in shell
Pete Holsberg
pjh at mccc.UUCP
Thu Jul 27 10:26:07 AEST 1989
In article <TALE.89Jul22220358 at imagine.pawl.rpi.edu> tale at pawl.rpi.edu writes:
=Here are some more examples to clear it up a little:
=$ x=* # x is set to a list of non-dotfiles in the current directory.
=$ x='*' # x is set to just *
=$ x="*" # x is still set to just *
Dave has hit it on the nose. An assignment such as x="*" does NOT
assign "*" to z; it assigns * to x. When the value of x is retrieved,
the shell sees the metacharacter * and expands it to all non-hidden
filenames in the current directory.
Thanks to Dave and the kind folks who responded by email.
--
Pete Holsberg -- Mercer College -- Trenton, NJ 08690
...!rutgers!njin!princeton!njsmu!mccc!pjh
More information about the Comp.unix.questions
mailing list