home *** CD-ROM | disk | FTP | other *** search
- 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
- From: hymowitz@whatever.cs.jhu.edu (Hymie don't play that.)
- Newsgroups: comp.unix.shell
- Subject: an ugly shell script that i'd like to fix
- Message-ID: <1992Aug19.011502.8295@blaze.cs.jhu.edu>
- Date: 19 Aug 92 01:15:02 GMT
- Sender: news@blaze.cs.jhu.edu (Usenet news system)
- Reply-To: hymowitz@cs.jhu.edu (Hymie don't play that.)
- Organization: Creative Sensualities dept, Jacquie's House of Underwear
- Lines: 29
-
- hello. i've got a two-part shell script. the main part is written
- in /bin/sh. i also have a small script, written in /bin/csh and run
- via source, which calls the /bin/sh script and performs 2 setenv's.
-
- question 1 is - can i pass parameters to the script if it's run with
- source?
-
- question 2 - can i perform a setenv by running the script directly
- without source, and keep the new values?
-
- question 3 - can i perform a setenv and keep the new values by running
- the /bin/sh script directly?
-
- question 4 - is it better, in this one instance, to write one script
- in csh, source it, than have 2 scripts? i generally consider
- ''don't write scripts in csh'' to be as sacred as ''don't use goto in c.''
-
- i believe the answer to all 3 questions is ''no.'' can anyone
- prove me wrong?
-
- the scripts work correctly now, and i know that ''if it ain't broke, don't
- fix it''...
-
- --hymie
- hymowitz@cs.jhu.edu hymie@jhuvms.bitnet
- -------------------------------------------------------------------------------
- It's the wimp. KILL THE WIMP!!!!!
- --Herman's Lust, to Intellect and Sensitivity, on Anxiety
- -------------------------------------------------------------------------------
-