Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!lll-winken!uunet!mcvax!ukc!acorn!moncam!paul From: paul@moncam.co.uk (Paul Hudson) Newsgroups: comp.unix.questions Subject: Is this a bug in sh? Message-ID: Date: 4 Jul 89 14:58:56 GMT Sender: paul@moncam.co.uk Distribution: all Organization: Monotype ADG, Cambridge, UK. Lines: 25 Am I just showing my ignorance of sh? Consider the two (executable) shell scripts.. script1 is and script2 is echo $0 echo $0 name=`basename $0` name= `basename $0` ^ Note the space here. executing script1 prints "script1" as you would expect. Executing script2 prints "script2" "script2" ...... and spawns shells at an enormous rate. This is sunos4.0 on a sun3/50. Go on, tell me I haven't RTFM .... ;-) Then tell me why it's this way. -- Paul Hudson MAIL: Monotype ADG, Science Park, Cambridge, CB4 4FQ, UK. PHONE: +44 (223) 420018 EMAIL: paul@moncam.co.uk, ;" FAX: +44 (223) 420911 ...!ukc!acorn!moncam!paul `"";";" "/dev/null full: please empty the bit bucket"