Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!rpi!batcomputer!christos From: christos@batcomputer.tn.cornell.edu (Christos S. Zoulas) Newsgroups: comp.unix.shell Subject: Re: weird csh thing Message-ID: <1991Jan8.080822.23306@batcomputer.tn.cornell.edu> Date: 8 Jan 91 08:08:22 GMT References: <1991Jan7.142732.28884@unvax.union.edu> Organization: Electrical Engineering, Cornell University, Ithaca NY Lines: 34 In article <1991Jan7.142732.28884@unvax.union.edu> boehme@unvax.union.edu (Eric M. Boehm) writes: >bagchi@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@ee.cornell.edu | Cornell University, Ithaca NY 14853. | | christos@crnlee.bitnet | Phone: Disconnected | Fax: (607) 254 4565 |