- Source: Env
- Source: ENV
- Firman Santyabudi
- HIV
- LG Electronics
- Ikan Napoleon
- Lamun
- Kerja Sama Partai Politik Pengusung Ganjar Pranowo
- Keanekaragaman hayati
- Universitas Islam Negeri Syarif Hidayatullah Jakarta
- Sepeda motor
- Sepeda motor listrik
- Env
- ENV
- LG enV (VX9900)
- Env (disambiguation)
- Env (gene)
- Newton's law of cooling
- Shebang (Unix)
- European ordering rules
- Human endogenous retrovirus-W
- Guard (computer science)
Wake Up (2024)
Jurassic World (2015)
Humane (2024)
Usury Academy (2023)
The Conference (2023)
No More Posts Available.
No more pages to load.
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.
In practice, env has another common use. It is often used by shell scripts to launch the correct interpreter. In this usage, the environment is typically not changed.
History
The version of env bundled in GNU coreutils was written by Richard Mlynarik, David MacKenzie, and Assaf Gordon. It first appeared in 4.4BSD, and is a part of POSIX.1 (with the -i option only).
GNU's env has been extended to handle signals and the current directory. FreeBSD's env supports a custom search path. Extensions found in both versions include -u, for unsetting variables, and -S, for splitting arguments (mainly in shebang).
Examples
To print out the set of current environment variables:
To create a new environment without any existing environment variables for a new shell:
To execute the X application xcalc and have it appear on a different display (i.e., with a modified environment whether the specified environment variable is replaced with the new value):
Note that this use of env is often unnecessary since most shells support setting environment variables in front of a command:
env may also be used in the hashbang line of a script to allow the interpreter to be looked up via the PATH. For example, here is the code of a Python script:
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 (more precisely, env does a system call to execvp, which does the job of locating the interpreter and launching it). 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.
See also
set
References
External links
env: set the environment for command invocation – Shell and Utilities Reference, The Single UNIX Specification, Version 4 from The Open Group
env(1) – Inferno General commands Manual
env—manual page from GNU coreutils.
env(1) – FreeBSD General Commands Manual
env(1): run a program in a modified environment – OpenBSD General Commands Manual
env(1): set and print environment – NetBSD General Commands Manual
env(1) – Linux User Manual – User Commands
env(1) – Solaris 11.4 User Commands Reference Manual
The ENV (Emission Neutral Vehicle) is an electric motorcycle prototype powered by a hydrogen fuel cell. It was developed by Intelligent Energy, a British company.
Specifications
The vehicle and the fuel cell centre respectively weigh approximately 80 and 20 kilograms. It uses a proton-exchange membrane fuel cell to generate about 8 hp or 6 kilowatts. The Discovery Channel has indicated it can reach approximately 80 km/h and, on a full tank may ride continuously for about 4 hours and travel a distance of 160 kilometres. The motorcycle is a preproduction prototype, which was targeted to sell for approximately $6000.
See also
Hydrogen vehicle
References
External links
Intelligent Energy
Business Week article
Fuel cell motorcycle, The Discovery Channel, reproduced at youtube.com, Oct 11, 2006