[ale] Environment Variables
Josin Alvistur
josin at dimensional.com
Tue Mar 11 11:32:30 EST 1997
On Tue, 11 Mar 1997, David Hamm wrote:
> I'd like to have a way to set my default printer on the fly from a child
> process (i.e. a program that sets the default printer ). If I set the PRINTER
> environment variable to something like this, "PRINTER=`cat ~/defprinter`", the
> environment variable only gets set at the time the variable is declared. Is
> there a way to have the variable set each time it is accessed?
david, under tcsh i use this:
alias perls 'eval setenv perls \"`list_perl`\"'
so that the environ variable "perls" is set to the output of the
"list_perl" program *each time* i execute the alias.
(as side info, "list_perls" is a perl script that finds which files
in the current directory are perl scripts)
as for having a child process modify parent's environ, i may be wrong and
rusty, but i thought that was not possible in unix.
- josin
More information about the Ale
mailing list