home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / unix / shell / 5163 < prev    next >
Encoding:
Text File  |  1992-12-24  |  1.3 KB  |  42 lines

  1. Newsgroups: comp.unix.shell
  2. Path: sparky!uunet!mcsun!chsun!uiag.ch!jonas
  3. From: jonas@uiag.ch (Jonas Furrer (317))
  4. Subject: Exporting environment variables form nested scripts
  5. Message-ID: <BzpoFo.2Hv@uiag.ch>
  6. Organization: EMCH+BERGER
  7. Date: Wed, 23 Dec 1992 12:09:23 GMT
  8. Lines: 32
  9.  
  10. How can I export environment variables from nested shell scripts?
  11.  
  12. Here is my trial:  (all scripts are csh-scripts)
  13.  
  14. % generate ---------+
  15.                     |
  16.                     v /* in generate */
  17.  
  18.               source project_env ----+
  19.                                      |
  20.                                      v /* in project_env
  21.  
  22.                                      setenv AMS1 /project/test1
  23.                                      setenv AMS2 /project/test2
  24.  
  25.                                      |
  26.                     +----------------+
  27.                     |
  28. % <-----------------+
  29. % printenv |grep AMS
  30. % /* nothing */
  31.  
  32. Thanks. Jonas.
  33.  
  34.  
  35.           +---------------------+---------------------------+
  36.           |Jonas Furrer         |E-Mail : jonas@uiag.ch     |
  37.           |Emch + Berger AG     |Tel    : +41 31 25 23 23   |
  38.           |Gartenstrasse 1      |Fax    : +41 31 25 16 85   |
  39.           |3001 BERN (CH)       |                           |
  40.           +---------------------+---------------------------+
  41.  
  42.