Path: utzoo!attcan!uunet!yale!spolsky-joel From: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Newsgroups: comp.unix.wizards Subject: Re: empty double backquotes unpredictable? Message-ID: <60350@yale-celray.yale.UUCP> Date: 12 May 89 02:39:30 GMT References: <779@unify.UUCP> Sender: root@yale.UUCP Reply-To: spolsky-joel@CS.YALE.EDU (Joel Spolsky) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 33 In article <779@unify.UUCP> rk@unify.UUCP (Ron Kuris) writes: >When running the csh, I typed only two backquotes (``) and got: >/s2/acct/rk/bin/: cannot execute > csh looks for the command "" (null string). "/s2/acct/rk/bin/" is in the path and it tries to concatenate "" onto the end of this, getting "/s2/acct/rk/bin/" ... which exists, so it doesn't have to look further. But it can't execute it. So it complains. You would get the same result by just typing any directory name. >When I removed /s2/acct/rk/bin from my path, the error changes to: >: cannot execute It is looking for the command "" (null string) in your current directory and not finding it. >What gives? I tried nifty things like: ``file >which runs /s2/acct/rk/bin/file. >Then I tried: echo `` >and got nothing. Seems real bizzare. Any explanations? Because the command `` doesn't generate any output (it fails to run), it is inline substituted with nothing so "``file" resolves to "file". Some naive guesses from... +----------------+----------------------------------------------------------+ | Joel Spolsky | bitnet: spolsky@yalecs.bitnet uucp: ...!yale!spolsky | | | internet: spolsky@cs.yale.edu voicenet: 203-436-1483 | +----------------+----------------------------------------------------------+ #include