home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!olivea!apple!news.oc.com!convex!tchrist
- From: tchrist@convex.COM (Tom Christiansen)
- Newsgroups: comp.unix.shell
- Subject: Re: simple csh question
- Message-ID: <1992Jul28.103300.12573@news.eng.convex.com>
- Date: 28 Jul 92 10:33:00 GMT
- References: <1992Jul28.005807.3129@hubcap.clemson.edu>
- Sender: usenet@news.eng.convex.com (news access account)
- Reply-To: tchrist@convex.COM (Tom Christiansen)
- Organization: CONVEX Realtime Development, Colorado Springs, CO
- Lines: 24
- Originator: tchrist@pixel.convex.com
- Nntp-Posting-Host: pixel.convex.com
- X-Disclaimer: This message was written by a user at CONVEX Computer
- Corp. The opinions expressed are those of the user and
- not necessarily those of CONVEX.
-
- From the keyboard of bdbryan@eng.clemson.edu:
- :Does anyone know why the following shell code snippet for the csh keeps giving
- :me a "@: Expression syntax" error message? Code follows:
- :
- :foreach record (`cat somefile`) # `somefile' contains simple ascii records. one number
- : # to a line.
- : @ ybacc = $ybacc + ((($record - $bave) * ($record - $bave))/$bcount)
- :end
- :
- :All the above variables are simple integer variables that have been previously
- :calculated.
-
- Would you believe it's because you've no space between your "/" and $bcount?
-
- You can't predict the csh. You can't trust it. Just say no.
-
- Thanks for yet another fine entry to csh.whynot .
-
- --tom
- --
- Tom Christiansen tchrist@convex.com convex!tchrist
- If you have ever seen the grim word "login:" on a screen, your mind
- is now a wholly-owned subsidiary of The Death Star.
- John Woods in <14105@ksr.com> of comp.unix.bsd
-