IPnom Home • Manuals • FreeBSD

 FreeBSD Man Pages

Man Sections:Commands (1)System Calls (2)Library Functions (3)Device Drivers (4)File Formats (5)Miscellaneous (7)System Utilities (8)
Keyword Live Search (10 results max):
 Type in part of a command in the search box.



     env -- set and print environment


     env [-i] [name=value ...] [utility [argument ...]]


     The env utility executes another utility after modifying the environment
     as specified on the command line.	The option name=value specifies an
     environment variable, name, with a value of value.

     The options are as follows:

     -i      Execute the utility with only those environment variables speci-
	     fied.  The environment inherited by env is ignored completely.

     If no utility is specified, env prints out the names and values of the
     variables in the environment, with one name/value pair per line.

     The env utility is sometimes useful with the `#!' construct (see
     execve(2)).  The only difference between ``#!/usr/local/bin/foo'' and
     ``#!/usr/bin/env /usr/local/bin/foo'' is that the latter works even if
     /usr/local/bin/foo is itself interpreted.	Using env this way also allows
     one to reference foo without the path, as well as set up the environment
     as desired.


     The env utility uses the PATH environment variable to locate the
     requested utility if the name contains no `/' characters.


     The env utility exits 0 on success, and >0 if an error occurs.  An exit
     status of 126 indicates that utility was found, but could not be exe-
     cuted.  An exit status of 127 indicates that utility could not be found.


     The env utility accepts the - option as a synonym for -i.


     printenv(1), sh(1), execvp(3), environ(7)


     The env utility conforms to IEEE Std 1003.1-2001 (``POSIX.1'').


     The env utility does not handle utility arguments with equal signs (`=')
     in their names, for obvious reasons.

FreeBSD 5.4			 May 12, 2003			   FreeBSD 5.4


Man(1) output converted with man2html , sed , awk