ENV(1) | General Commands Manual | ENV(1) |
env
— control and
print environment
env |
[-i ] [-u
name]
[name=value]
[command [argument...]] |
env |
[-i ] [-u
name]
[name=value]
-S command_string |
env
if specified runs
command or command_string, and
otherwise prints the environment.
The environment can be modified via the following options:
-i
-u
nameThe -S
command_string option allows to split a full command
passed as a single argument similarly to a shell, useful for shebangs where
most Unix-likes do not do argument splitting.
For example:
#!/usr/bin/env -S perl -w
-T
If command is invoked, the exit status of
env
shall be the exit status of
command; Otherwise, the env
utility shall exit with one of the following values:
env
completed successfully.env
env
should be compliant with the IEEE Std
1003.1-2024 (“POSIX.1”) specification.
The -u
flag is an extension known to be
present in FreeBSD, NetBSD,
OpenBSD 7.6, GNU coreutils, BusyBox, ...
The -S
flag in an extension known to be present in GNU
coreutils and FreeBSD.
Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
2022-04-19 | Linux 6.6.67-gentoo-x86_64 |