weird csh thing
Christos S. Zoulas
christos at batcomputer.tn.cornell.edu
Tue Jan 8 19:08:22 AEST 1991
In article <1991Jan7.142732.28884 at unvax.union.edu> boehme at unvax.union.edu (Eric M. Boehm) writes:
>bagchi at eecs.umich.edu (Ranjan Bagchi) writes:
>
>>$ set p = "w | tail +3 "
>>$ echo $p
>>w | tail +3
>>$ $p
>>Usage: w [ -hlsuw ] [ user ]
>>$ w | tail +3
>>benjo ttyp3 10:13pm 41 4 -sh
>>benjo ttyp4 10:17pm 3:22 4 -csh
>>$ exit
>>$ exit
>
>>shouldn't "$p" have the same effect as "w | tail +3" ?
>
>No, it should not. It has to do with the way the C Shell parses the
>command line. The following is taken from "The UNIX C Shell Field
>Guide, Gail Anderson, Paul Anderson, Prentice Hall, 1986, ISBN
>0-13-937468-X", pages 262-266. (I highly recommend it).
> ... lines deleted...
The above information is correct. On the other hand:
$ eval $p
should work, but it does not because eval in csh is broken.
christos
--
+------------------------------------------------------------------------+
| Christos Zoulas | 389 Theory Center, Electrical Engineering, |
| christos at ee.cornell.edu | Cornell University, Ithaca NY 14853. |
| christos at crnlee.bitnet | Phone: Disconnected | Fax: (607) 254 4565 |
More information about the Comp.unix.shell
mailing list