[ale] Environment Variables

Geoffrey Myers geof at denali.abraxis.com
Tue Mar 11 16:40:40 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.

You may be rusty, but you're not wrong. :)  Any changes a child makes to
the environment are not 'seen' by the parent.

}
}- josin

-- 
Until later:
Geoffrey Myers   geof at abraxis.com	http://www.abraxis.com/geof

	Opinions expressed by me are mine, all mine, only mine.....






More information about the Ale mailing list