weird csh thing
Neil Rickert
rickert at mp.cs.niu.edu
Tue Jan 8 14:17:49 AEST 1991
In article <BAGCHI.91Jan6000722 at snarf.eecs.umich.edu> bagchi at eecs.umich.edu (Ranjan Bagchi) writes:
>anyone care to explain?? (I`m in csh)
>
>$ set p = "w | tail +3 "
>
>shouldn't "$p" have the same effect as "w | tail +3" ?
>
I suppose someone should point out that, taken literally, "$p" does
have the same effect as "w | tail +3 ".
% set p="w | tail +3 "
% "w | tail +3 "
w | tail +3 : Command not found.
% "$p"
w | tail +3 : Command not found.
Of course this wasn't what you intended, but it also demonstrates that
quoting does effect the meaning of shell commands.
--
=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=
Neil W. Rickert, Computer Science <rickert at cs.niu.edu>
Northern Illinois Univ.
DeKalb, IL 60115 +1-815-753-6940
More information about the Comp.unix.shell
mailing list