home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!mcsun!uknet!rook.ukc.ac.uk!falcon.ukc.ac.uk!bnb
- From: bnb@ukc.ac.uk (B.N.Blackmore)
- Newsgroups: comp.unix.shell
- Subject: Re: if syntax
- Keywords: if, csh
- Message-ID: <6432@falcon.ukc.ac.uk>
- Date: 7 Nov 92 13:54:03 GMT
- References: <1992Nov5.230024.14504@u.washington.edu> <6430@falcon.ukc.ac.uk> <BxB62z.230@news.cso.uiuc.edu>
- Reply-To: bnb@ukc.ac.uk (The Impossible Dreamer)
- Organization: Computing Lab, University of Kent at Canterbury, UK.
- Lines: 28
- Nntp-Posting-Host: falcon.ukc.ac.uk
-
- In article <BxB62z.230@news.cso.uiuc.edu> jal41820@uxa.cso.uiuc.edu (Smiley) writes:
- :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.
-
- It may work fine on your version of csh, but it doesn't on mine !! My own
- version is more PORTABLE.
-
- :--
- : Josh Laff # #
- :email to: smiley@uiuc.edu _ _ Hello! I am a signature virus!
- : (217) 384-6249 |#\_____/#| Join the fun and copy mo*#(*&^!>.
- : \#######/
-
-
- --
- Brian Blackmore, Darwin College, The University of Kent at Canterbury.
- Vee Eye, They called it a programmers editor, I'd rather program a new one.
-