Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!iuvax!cica!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!rpi!rpi.edu!tale From: tale@pawl.rpi.edu (David C Lawrence) Newsgroups: comp.unix.questions Subject: Re: Strangeness in shell Message-ID: Date: 27 Jul 89 23:47:38 GMT References: <432@mccc.UUCP> <9700009@osiris.cso.uiuc.edu> <446@mccc.UUCP> Sender: usenet@rpi.edu Reply-To: tale@pawl.rpi.edu Lines: 24 In-reply-to: pjh@mccc.UUCP's message of 27 Jul 89 00:26:07 GMT In article I apparently wrote: Me> Here are some more examples to clear it up a little: Me> $ x=* # x is set to a list of non-dotfiles in the current directory. Me> $ x='*' # x is set to just * Me> $ x="*" # x is still set to just * In <446@mccc.UUCP> pjh@mccc.UUCP (Pete Holsberg) writes: PH> Dave has hit it on the nose. Whonk. Dave should be hit _in_ the nose. I'm surprised I let that come out. The first example is bogus. Globbing is not done on the RHS of variable assignment. That is, it isn't done on the value to be assigned. If it had been $ x= * Then, assuming you had at least one file in the directory, an attempt would be made to execute the first one to which * expanded with the rest as arguments. Fun, ne? Sorry about the error, Dave -- (setq mail '("tale@pawl.rpi.edu" "tale@itsgw.rpi.edu" "tale@rpitsmts.bitnet"))