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

  1. Path: sparky!uunet!pipex!warwick!uknet!acorn!ixi!ixi!pd
  2. From: pd@x.co.uk (Paul Davey)
  3. Newsgroups: comp.unix.shell
  4. Subject: Re: if syntax
  5. Message-ID: <PD.92Nov7194625@herts.x.co.uk>
  6. Date: 7 Nov 92 19:46:25 GMT
  7. References: <1992Nov5.230024.14504@u.washington.edu> <6430@falcon.ukc.ac.uk>
  8. Sender: paul@x.co.uk (Paul Davey)
  9. Organization: IXI Ltd.
  10. Lines: 20
  11. In-Reply-To: bnb@ukc.ac.uk's message of 6 Nov 92 13:58:05 GMT
  12. X-Disclaimer: This is not the view of IXI Ltd unless explicitly stated.
  13. X-Copyright: The author asserts the right of paternity in this message.
  14.  
  15.  
  16. >>>>> On 6 Nov 92 13:58:05 GMT, bnb@ukc.ac.uk (B.N.Blackmore) said:
  17.  
  18. -> If you still need to write this in C-Shell the following should do
  19. -> what you require. (no bets on it though)
  20.  ... (deleted)
  21.  
  22. Or alternatively,
  23.  
  24.     #! /bin/csh -f
  25.     test -s testes
  26.     if ( ! $status) echo "yes"
  27.  
  28. Note that the ``!'' character is needed since the ``if'' in csh has
  29. reverse logic to the bourne sh ``if''.
  30.  
  31. -> A better idea though would be to program it in the bourne shell
  32.  
  33. Quite so.
  34.  
  35. --
  36.     Regards,            IXI            Internet: pd@x.co.uk
  37.     Paul Davey        Vision Park    UUCP:     pd@ixi.uucp
  38.                 Cambridge      Bang:     ...!uunet!ixi!pd
  39.  "These are interesting times"    CB4 4ZR, UK    Tel:      +44 223 236 555
  40.