env(1)


NAME
     env - set environment for command

SYNOPSIS
     env [-ia] [name=value] ...  [utility [argument...]]

DESCRIPTION
     Env modifies its environment according to the name=value  arguments,  and
     executes utility with the given arguments with the modified environment.

     If no utility is specified then the modified environment  is  printed  as
     name=value strings, one per line.

OPTIONS

     -i   Use  exactly  the  environment  specified  by  the  arguments;   the
          inherited environment is ignored.

     -a   Specify all arguments  for  the  utility,  i.e.  the  first  of  the
          arguments  is  used  as  argv[0],  the  program  name.  Normally the
          program name is utility itself.

ENVIRONMENT

     PATH    The path used to find utility.  It is as modified  by  env,  i.e.
             not the inherited PATH.

SEE ALSO
     sh(1), execvp(3), environ(5).

DIAGNOSTICS
     The return code is 0 after successfully printing the environment, 1 on an
     error  within  env,  126  if the utility could not be executed, or 127 if
     utility could not be found.  Appropriate diagnostic messages are  printed
     on  standard  error.  If utility can be executed then it replaces env, so
     the return code is then the return code of utility.

NOTES
     Env is only useful with options  or  without  arguments.   Otherwise  the
     shell  can  do exactly what env can do, simply omit the word "env" on the
     command line.

AUTHOR
     Kees J. Bot (kjb@cs.vu.nl)