home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / unix / shell / 3576 next >
Encoding:
Internet Message Format  |  1992-08-23  |  695 b 

  1. Path: sparky!uunet!utcsri!bonnie.concordia.ca!daily-planet.concordia.ca!alcor.Concordia.CA!gsa
  2. From: gsa@alcor.concordia.ca ( CON U GRADUATE STUDENTS' ASSOC )
  3. Newsgroups: comp.unix.shell
  4. Subject: Calling a function from a case loop.
  5. Message-ID: <4785@daily-planet.concordia.ca>
  6. Date: 23 Aug 92 16:46:22 GMT
  7. Sender: usenet@daily-planet.concordia.ca
  8. Distribution: comp.unix.shell
  9. Organization: Concordia University, Montreal, Quebec
  10. Lines: 20
  11.  
  12. Has anyhone tried calling a function from a case condition?
  13. This one doesn't seem to work:
  14.  
  15. read selection
  16. case $selection in
  17.  
  18. 1)
  19. call_some_funtion() ;;
  20.  
  21. esac
  22. done
  23. exit 0
  24.                       
  25. call_some_funtion()
  26. {
  27. echo "Hello World"
  28. }
  29.  
  30. -----
  31. Dan.
  32.