home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / shell / 3219 < prev    next >
Encoding:
Text File  |  1992-07-30  |  784 b   |  34 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!jato!mona!mlei
  3. From: mlei@mona.jpl.nasa.gov (Mary Lei)
  4. Subject: function with cshell script
  5. Message-ID: <1992Jul30.223420.20253@jato.jpl.nasa.gov>
  6. Sender: nobody@jato.jpl.nasa.gov
  7. Nntp-Posting-Host: mona.jpl.nasa.gov
  8. Organization: jpl
  9. Distribution: JPL
  10. Date: Thu, 30 Jul 1992 22:34:20 GMT
  11. Lines: 21
  12.  
  13. Does any one have an example of how to define a function within a cshell script, like in this borne shell example:
  14.  
  15. #! /bin/sh 
  16. clean_up()
  17. {
  18.  [ -f $$ftp.script ] && rm -f $$ftp.script
  19.  [ -f $$msg ] && rm -f $$msg
  20.  
  21.  echo ""
  22.  echo "Please select the \"CONTINUE\" button to continue!"
  23.  cd $opwd
  24. }
  25.  
  26. #main line
  27.   clean_up
  28. ...
  29.  
  30. _____________________________
  31. Please email me mlei@gina
  32. Thanks.
  33. I am running under SUN OS 4.1.1
  34.