home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3578 < prev    next >
Encoding:
Text File  |  1992-08-23  |  905 b   |  31 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!uunet.ca!geac!r-node!singh
  3. From: singh@r-node.gts.org (Rajendra Singh)
  4. Subject: [TCSH]  IF's in .login
  5. Message-ID: <1992Aug23.234043.20012@r-node.gts.org>
  6. Organization: Public Access UNIX Information System
  7. Date: Sun, 23 Aug 1992 23:40:43 GMT
  8. Lines: 21
  9.  
  10. Hello:
  11.  
  12. I've noticed something strange, and can't figure out why it happens.  If
  13. I have the following line in my ".login" file, I get the error:  if:
  14. Expression sytax:
  15.  
  16. if (cmp -s filea fileb) then
  17.    echo "something"
  18. else
  19.    echo "something else"
  20. endif
  21.  
  22. However, if I have the exact same lines in a separate file it works.  For
  23. example, if I put the above lines in a file called "compare", then in my
  24. ".login" I have a line with "compare" on it, then it works fine.  Any
  25. suggestions?
  26.  
  27. Thanks in advance.
  28. -- 
  29. Raj (singh@r-node.pci.on.ca)
  30. E-Mail:  tcomsing@bluffs.scar.utoronto.ca (University of Toronto)
  31.