Quantcast
Channel: How can I set an environment variable only for the duration of the script? - Stack Overflow
Browsing latest articles
Browse All 5 View Live

Image may be NSFW.
Clik here to view.

Answer by zhao Wang for How can I set an environment variable only for the...

We can use command env to alter environments or just use a simple augment method as bash mannual recordingThe environment for any simple command or function may be augmentedtemporarily by prefixing it...

View Article



Answer by Rockallite for How can I set an environment variable only for the...

VAR1=value1 VAR2=value2 myScript args ...

View Article

Answer by glenn jackman for How can I set an environment variable only for...

env VAR=value myScript args ...

View Article

Answer by hmakholm left over Monica for How can I set an environment variable...

WARNING --- READ THE COMMENTS.Just putexport HOME=/blah/whateverat the point in the script where you want the change to happen. Since each process has its own set of environment variables, this...

View Article

How can I set an environment variable only for the duration of the script?

On Linux (Ubuntu 11.04 (Natty Narwhal)) in Bash, is it possible to temporarily set an environment variable that will only be different from the normal variable for the duration of the script?For...

View Article

Browsing latest articles
Browse All 5 View Live




Latest Images