Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!purdue!haven!adm!smoke!gwyn From: gwyn@smoke.BRL.MIL (Doug Gwyn) Newsgroups: comp.unix.questions Subject: Re: Is this a bug in sh? Message-ID: <10500@smoke.BRL.MIL> Date: 6 Jul 89 20:50:19 GMT References: Reply-To: gwyn@brl.arpa (Doug Gwyn) Organization: Ballistic Research Lab (BRL), APG, MD. Lines: 15 In article paul@moncam.co.uk (Paul Hudson) writes: >script1 is and script2 is >echo $0 echo $0 >name=`basename $0` name= `basename $0` > ^ > Note the space here. The space separates "words", so in script2 you're running a command that is obtained as the output from the `` quoted command, prefixed by a word that sets the environment variable "name" to an empty string just for that one command. It's not a bug; it's the way the shell is documented as working. Change some other syntax and you'll get yet other variations in behavior.