home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #18 / NN_1992_18.iso / spool / comp / unix / shell / 3520 < prev    next >
Encoding:
Internet Message Format  |  1992-08-18  |  1.7 KB

  1. Path: sparky!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!sdd.hp.com!mips!darwin.sura.net!blaze.cs.jhu.edu!whatever.cs.jhu.edu!hymowitz
  2. From: hymowitz@whatever.cs.jhu.edu (Hymie don't play that.)
  3. Newsgroups: comp.unix.shell
  4. Subject: an ugly shell script that i'd like to fix
  5. Message-ID: <1992Aug19.011502.8295@blaze.cs.jhu.edu>
  6. Date: 19 Aug 92 01:15:02 GMT
  7. Sender: news@blaze.cs.jhu.edu (Usenet news system)
  8. Reply-To: hymowitz@cs.jhu.edu (Hymie don't play that.)
  9. Organization: Creative Sensualities dept, Jacquie's House of Underwear
  10. Lines: 29
  11.  
  12. hello.  i've got a two-part shell script.  the main part is written
  13. in /bin/sh.  i also have a small script, written in /bin/csh and run
  14. via source, which calls the /bin/sh script and performs 2 setenv's.
  15.  
  16. question 1 is - can i pass parameters to the script if it's run with
  17. source? 
  18.  
  19. question 2 - can i perform a setenv by running the script directly
  20. without source, and keep the new values? 
  21.  
  22. question 3 - can i perform a setenv and keep the new values by running
  23. the /bin/sh script directly?
  24.  
  25. question 4 - is it better, in this one instance, to write one script
  26. in csh, source it, than have 2 scripts? i generally consider
  27. ''don't write scripts in csh'' to be as sacred as ''don't use goto in c.''
  28.  
  29. i believe the answer to all 3 questions is ''no.'' can anyone
  30. prove me wrong? 
  31.  
  32. the scripts work correctly now, and i know that ''if it ain't broke, don't
  33. fix it''... 
  34.  
  35. --hymie
  36. hymowitz@cs.jhu.edu                                         hymie@jhuvms.bitnet
  37. -------------------------------------------------------------------------------
  38. It's the wimp.  KILL THE WIMP!!!!!
  39. --Herman's Lust, to Intellect and Sensitivity, on Anxiety
  40. -------------------------------------------------------------------------------
  41.