env.1 (1472B)
- .\" Collection of Unix tools, comparable to coreutils
- .\" Copyright 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
- .\" SPDX-License-Identifier: MPL-2.0
- .Dd 2022-04-19
- .Dt ENV 1
- .Os
- .Sh NAME
- .Nm env
- .Nd control and print environment
- .Sh SYNOPSIS
- .Nm
- .Op Fl i
- .Op Fl u Ar name
- .Op Fl -unset= Ns Ar name
- .Op Ar name Ns = Ns Ar value
- .Op Ar command Op Ar argument ...
- .Sh DESCRIPTION
- .Nm
- with no arguments prints the environment, or if specified runs
- .Ar command .
- .Pp
- The environment can be modified via the following options:
- .Bl -tag -width Ds
- .It Fl i
- Ignore the existing environment.
- .It Fl u Ar name | Fl -unset= Ns Ar name
- Removes the variable named
- .Ar name
- from the new environment.
- .It Ar name Ns = Ns Ar value
- Adds the variable named
- .Ar name
- with the value
- .Ar value
- into the new environment, it cannot itself contain the
- .Qq =
- character.
- .El
- .Sh EXIT STATUS
- If
- .Ar command
- is invoked, the exit status of
- .Nm
- shall be the exit status of
- .Ar command ;
- Otherwise, the env utility shall exit with one of the following values:
- .Bl -tag -width Ds
- .It 0
- .Nm
- completed successfully.
- .It 1
- An error occured in
- .Nm
- .It 126
- .Ar command
- was found but couldn't be invoked.
- .It 127
- .Ar command
- wasn't found.
- .El
- .Sh STANDARDS
- .Nm
- is compliant with the
- .St -p1003.1-2008
- specification.
- .Pp
- The
- .Fl u
- flag is an extension known to be present in FreeBSD, NetBSD, GNU coreutils, BusyBox, ...
- .Sh AUTHORS
- .An Haelwenn (lanodan) Monnier Aq Mt contact@hacktivis.me