home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #16 / NN_1992_16.iso / spool / comp / unix / question / 9362 < prev    next >
Encoding:
Internet Message Format  |  1992-07-23  |  1.1 KB

  1. Path: sparky!uunet!pmafire!news.dell.com!swrinde!mips!darwin.sura.net!eng.ufl.edu!whale.stat.ufl.edu!zzang
  2. From: zzang@whale.stat.ufl.edu (Zhuo Zang)
  3. Newsgroups: comp.unix.questions
  4. Subject: sh question: Please Help!
  5. Message-ID: <1992Jul23.220337.12886@eng.ufl.edu>
  6. Date: 23 Jul 92 22:03:37 GMT
  7. References: <AJG.92Jul22114544@sp1.ccd.harris.com> <1992Jul23.144652.1785@b11.b11.ingr.com> <1992Jul23.212852.28935@cs.cornell.edu>
  8. Sender: news@eng.ufl.edu (Usenet Diskhog System)
  9. Organization: College of LAS, UFL
  10. Lines: 31
  11.  
  12. Helllo,
  13. I try to print out the usage
  14. in serveral places in a !/bin/sh script.
  15. If I use all the echo statement 
  16. wherever I need, the file will be
  17. very long. Is it possible to define
  18. a var usage for this purpose, and
  19. when I need print out the usage,
  20. I may simply use:
  21. ${usage}
  22.  
  23. If you have only one line, you may use
  24. usage="echo Usage"
  25. However, if you have two line, I dont know how.
  26. say , you need put two line statements:
  27.  
  28. echo Usage:
  29. echo Options:
  30.  
  31. in a variable.
  32.  
  33. I tried :
  34. usage="echo Usage:;echo Options:;"
  35. it doesnt work.
  36.  
  37. Thanks in advance !
  38.  
  39. -- 
  40. Zhuo ZANG
  41. Department of Statistics               E-mail: zzang@stat.ufl.edu
  42. University of Florida
  43.