home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / unix / shell / 4584 < prev    next >
Encoding:
Internet Message Format  |  1992-11-08  |  1.5 KB

  1. Path: sparky!uunet!mcsun!uknet!rook.ukc.ac.uk!falcon.ukc.ac.uk!bnb
  2. From: bnb@ukc.ac.uk (B.N.Blackmore)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: if syntax
  5. Keywords: if, csh
  6. Message-ID: <6432@falcon.ukc.ac.uk>
  7. Date: 7 Nov 92 13:54:03 GMT
  8. References: <1992Nov5.230024.14504@u.washington.edu> <6430@falcon.ukc.ac.uk> <BxB62z.230@news.cso.uiuc.edu>
  9. Reply-To: bnb@ukc.ac.uk (The Impossible Dreamer)
  10. Organization: Computing Lab, University of Kent at Canterbury, UK.
  11. Lines: 28
  12. Nntp-Posting-Host: falcon.ukc.ac.uk
  13.  
  14. In article <BxB62z.230@news.cso.uiuc.edu> jal41820@uxa.cso.uiuc.edu (Smiley) writes:
  15. :bnb@ukc.ac.uk (B.N.Blackmore) writes:
  16. ::)you to test for files, but this is not as flexible as the bourne shell way of
  17. ::)doing it. If you still need to write this in C-Shell the following should do
  18. ::)what you require. (no bets on it though)
  19. ::)#! /bin/csh
  20. ::)if ((-e testes)&&(!(-z testes))) then
  21. ::)    echo "yes"
  22. ::)endif
  23. :You're making it a tad too complex.
  24. :
  25. :if ( -s testes) then
  26. :
  27. :works just fine.
  28.  
  29. It may work fine on your version of csh, but it doesn't on mine !! My own
  30. version is more PORTABLE.
  31.  
  32. :-- 
  33. :        Josh Laff              #     #      
  34. :email to: smiley@uiuc.edu     _       _     Hello! I am a signature virus!  
  35. :      (217) 384-6249         |#\_____/#|    Join the fun and copy mo*#(*&^!>.
  36. :                              \#######/     
  37.  
  38.  
  39. --
  40. Brian Blackmore, Darwin College, The University of Kent at Canterbury.
  41. Vee Eye, They called it a programmers editor, I'd rather program a new one.
  42.