home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gatech!concert!borg!rukbat!tell
- From: tell@rukbat.cs.unc.edu (Stephen Tell)
- Newsgroups: comp.lang.perl
- Subject: Re: Changing environment variables
- Message-ID: <18322@borg.cs.unc.edu>
- Date: 12 Dec 92 05:28:09 GMT
- References: <1992Dec3.145051.23920@med.umich.edu> <WALT.92Dec10155038@bcarh1d7.bnr.ca>
- Sender: news@cs.unc.edu
- Organization: The University of North Carolina at Chapel Hill
- Lines: 26
-
- In article <WALT.92Dec10155038@bcarh1d7.bnr.ca> walt@bcarh1d7.bnr.ca (Walt Sullivan) writes:
-
- >One way to make changes to your shell's environment is to write your
- >Perl script so that the only thing(s) it outputs to stdout are "setenv
- >VARNAME varvalue ;setenv VARNAME2 varvalue2;", and do (via an alias,
- >if you like):
-
- >eval `Perl_script`
-
- If you do this for somthing you distribute far and wide, be sure it can
- alternately generate "VARNAME=value; export VARNAME" for people who use
- the One True Shell (sh). Better yet, put the "export VARNAME" statements on
- a seperate line(s) so that when using the rc shell I can use
-
- eval `{ Perl_script | grep -v '^export' }
-
- >Walt Sullivan INTERNET: walt@bnr.ca (work)
-
- Just remember, "All the world is not a csh"
-
- Steve
- --
- Steve Tell tell@cs.unc.edu H: 919 968 1792 | #5L Estes Park apts
- UNC Chapel Hill Computer Science W: 919 962 1845 | Carrboro NC 27510
- Engineering is a _lot_ like art: Some circuits are like lyric poems, some
- are like army manuals, and some are like The Hitchhiker's Guide to the Galaxy..
-