Quantcast
Viewing latest article 1
Browse Latest Browse All 5

Answer by zhao Wang for How can I set an environment variable only for the duration of the script?

Image may be NSFW.
Clik here to view.
enter image description here
We can use command env to alter environments or just use a simple augment method as bash mannual recording

The environment for any simple command or function may be augmentedtemporarily by prefixing it with parameter assignments, as describedin Shell Parameters. These assignment statements affect only theenvironment seen by that command.

From Bash mannual


Viewing latest article 1
Browse Latest Browse All 5

Trending Articles