Env - Related Links
Open Access Articles- Top Results for Env
Journal of Civil & Environmental EngineeringA Practical Framework for Implementing Distributed Leadership by Abu Dhabi Police
International Journal of Waste ResourcesComparative Assessment of the Environmental Implication of Management Options for Municipal Solid Waste in Nigeria
Journal of Aquaculture Research & DevelopmentEditor Note: Journal of Aquaculture Research & Development Volume 8, Issue 2
Journal of Civil & Environmental EngineeringStrong-Back System Coupled with Framed Structure to Control the Building Seismic Response
Journal of Civil & Environmental EngineeringEstablishment of a Composite Safety Index for Pavement Management
env is a shell command for Unix and Unix-like operating systems. It is used to either print a list of environment variables or run another utility in an altered environment without having to modify the currently existing environment. Using env, variables may be added or removed, and existing variables may be changed by assigning new values to them.
To clear the environment (creating a new environment without any existing environment variables) for a new shell:
env -i /bin/sh
env DISPLAY=foo.bar:1.0 xcalc
Here is the code of a very simple Python script:
#!/usr/bin/env python2 print "Hello World."
In this example, /usr/bin/env is the full path of the env command. The environment is not altered.
Note that it is possible to specify the interpreter without using env, by giving the full path of the python interpreter. A problem with that approach is that on different computer systems, the exact path may be different. By instead using env as in the example, the interpreter is searched for and located at the time the script is run. This makes the script more portable, but also increases the risk that the wrong interpreter is selected because it searches for a match in every directory on the executable search path. It also suffers from the same problem in that the path to the env binary may also be different on a per-machine basis.
- The Single UNIX® Specification, Issue 7 from The Open Group : set the environment for command invocation – Commands & Utilities Reference,
- env -- manual page from GNU coreutils.
- OpenBSD General Commands Manual : run a program in a modified environment –
Lua error in package.lua at line 80: module 'Module:Buffer' not found.