home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.unix.shell
- Path: sparky!uunet!ukma!wupost!uwm.edu!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!jal41820
- From: jal41820@uxa.cso.uiuc.edu (Smiley)
- Subject: Re: if syntax
- References: <1992Nov5.230024.14504@u.washington.edu> <6430@falcon.ukc.ac.uk>
- Message-ID: <BxB62z.230@news.cso.uiuc.edu>
- Sender: usenet@news.cso.uiuc.edu (Net Noise owner)
- Organization: University of Illinois at Urbana
- Date: Fri, 6 Nov 1992 18:59:21 GMT
- Keywords: if, csh
- Lines: 21
-
- bnb@ukc.ac.uk (B.N.Blackmore) writes:
- :)you to test for files, but this is not as flexible as the bourne shell way of
- :)doing it. If you still need to write this in C-Shell the following should do
- :)what you require. (no bets on it though)
-
- :)#! /bin/csh
- :)if ((-e testes)&&(!(-z testes))) then
- :) echo "yes"
- :)endif
-
- You're making it a tad too complex.
-
- if ( -s testes) then
-
- works just fine.
-
- --
- Josh Laff # #
- email to: smiley@uiuc.edu _ _ Hello! I am a signature virus!
- (217) 384-6249 |#\_____/#| Join the fun and copy mo*#(*&^!>.
- \#######/
-