Another bug with csh - `cat /tmp/a`
Michael Greim
greim at sbsvax.UUCP
Tue Aug 30 21:30:41 AEST 1988
In article <3869 at psuvax1.cs.psu.edu>, flee at blitz (Felix Lee) writes:
= In <5144 at vdsvax.steinmetz.ge.com>, Bruce G. Barnett writes:
= > echo ls >/tmp/a
= > `cat /tmp/a`
= > results:
= > ls: Command not found.
=
= This is because csh tries to glob the command name: if you type
= "f*" and "f*" expands (uniquely) to "foo", then csh will execute
= "foo" without ever looking at your PATH. ("foo" will get executed
= even if "." isn't in your PATH.)
Try it. csh looks at PATH, even if you use `...` or "*".
"f*" will get expanded, because csh still knows your current
working directory. But when it tries to execute the file foo
it will give : "command not found".
=
= And the globbing routine also tries backquote substitution. So
= the globbing succeeds, and csh ignores your PATH.
On my machine the above produces a listing of files in the current
directory.
The reason for the "ls: Command not found" is most probably that
/bin, or wherever ls might be, is not in PATH.
-mg
--
UUCP: ...!uunet!unido!sbsvax!greim | Michael T. Greim
or greim at sbsvax.UUCP | Universitaet des Saarlandes
CSNET: greim%sbsvax.uucp at Germany.CSnet| FB 10 - Informatik (Dept. of CS)
ARPA: greim%sbsvax.uucp at uunet.UU.NET | Bau 36, Im Stadtwald 15
voice: +49 681 302 2434 | D-6600 Saarbruecken 11, West Germany
# include <disclaimers/std.h>
More information about the Comp.unix.questions
mailing list