Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!gem.mps.ohio-state.edu!rpi!nyser!njin!princeton!njsmu!mccc!pjh From: pjh@mccc.UUCP (Pete Holsberg) Newsgroups: comp.unix.questions Subject: Re: Strangeness in shell Message-ID: <448@mccc.UUCP> Date: 30 Jul 89 02:35:23 GMT References: <432@mccc.UUCP> <9700009@osiris.cso.uiuc.edu> <446@mccc.UUCP> Reply-To: pjh@mccc.UUCP (Pete Holsberg) Organization: The College On The Other Side of U. S. Route 1 Lines: 36 In article tale@pawl.rpi.edu writes: =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. Consider it done! =I'm surprised I let that =come out. The first example is bogus. Globbing is not done on the =RHS of variable assignment. Why not? =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. How about a logical explanation of why x=* x="*" and x='*' have the same effect?? -- Pete Holsberg -- Mercer College -- Trenton, NJ 08690 ...!rutgers!princeton!njsmu!mccc!pjh