Annotation of src/usr.bin/env/env.1, Revision 1.1
1.1 ! deraadt 1: .\" Copyright (c) 1980, 1990 The Regents of the University of California.
! 2: .\" All rights reserved.
! 3: .\"
! 4: .\" This code is derived from software contributed to Berkeley by
! 5: .\" the Institute of Electrical and Electronics Engineers, Inc.
! 6: .\" Redistribution and use in source and binary forms, with or without
! 7: .\" modification, are permitted provided that the following conditions
! 8: .\" are met:
! 9: .\" 1. Redistributions of source code must retain the above copyright
! 10: .\" notice, this list of conditions and the following disclaimer.
! 11: .\" 2. Redistributions in binary form must reproduce the above copyright
! 12: .\" notice, this list of conditions and the following disclaimer in the
! 13: .\" documentation and/or other materials provided with the distribution.
! 14: .\" 3. All advertising materials mentioning features or use of this software
! 15: .\" must display the following acknowledgement:
! 16: .\" This product includes software developed by the University of
! 17: .\" California, Berkeley and its contributors.
! 18: .\" 4. Neither the name of the University nor the names of its contributors
! 19: .\" may be used to endorse or promote products derived from this software
! 20: .\" without specific prior written permission.
! 21: .\"
! 22: .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
! 23: .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
! 24: .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
! 25: .\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
! 26: .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
! 27: .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
! 28: .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
! 29: .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
! 30: .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
! 31: .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
! 32: .\" SUCH DAMAGE.
! 33: .\"
! 34: .\" from: @(#)printenv.1 6.7 (Berkeley) 7/28/91
! 35: .\" $Id: env.1,v 1.4 1994/01/11 02:20:20 jtc Exp $
! 36: .\"
! 37: .Dd August 27, 1993
! 38: .Dt ENV 1
! 39: .Os
! 40: .Sh NAME
! 41: .Nm env
! 42: .Nd set and print environment
! 43: .Sh SYNOPSIS
! 44: .Nm env
! 45: .Op Fl i
! 46: .Op Ar name=value ...
! 47: .Oo
! 48: .Ar utility
! 49: .Op argument ...
! 50: .Oc
! 51: .Sh DESCRIPTION
! 52: .Nm env
! 53: executes
! 54: .Ar utility
! 55: after modifying the environment as
! 56: specified on the command line. The option
! 57: .Ar name=value
! 58: specifies
! 59: an environmental variable,
! 60: .Ar name ,
! 61: with a value of
! 62: .Ar value .
! 63: The option
! 64: .Sq Fl i
! 65: causes
! 66: .Nm env
! 67: to completely ignore the environment
! 68: it inherits.
! 69: .Pp
! 70: If no
! 71: .Ar utility
! 72: is specified,
! 73: .Nm env
! 74: prints out the names and values
! 75: of the variables in the environment, with one
! 76: .Ar name=value
! 77: pair per line.
! 78: .Sh DIAGNOSTICS
! 79: If the
! 80: .Ar utility
! 81: is invoked, the exit status of
! 82: .Nm env
! 83: shall be the exit status of
! 84: .Ar utility;
! 85: otherwise, the
! 86: .Nm env
! 87: utility exits with one of the following values:
! 88: .Bl -tag -width Ds
! 89: .It 0
! 90: The
! 91: .Nm env
! 92: utility completed successfully
! 93: .It 1-125
! 94: An error occurred in the
! 95: .Nm env
! 96: utility.
! 97: .It 126
! 98: The utility specified by
! 99: .Ar utility
! 100: was found, but could not be invoked.
! 101: .It 127
! 102: The utility specified by
! 103: .Ar utility
! 104: could not be found.
! 105: .El
! 106: .Sh COMPATIBILITY
! 107: The historic
! 108: .Fl
! 109: option has been deprecated but is still supported in this implementation.
! 110: .Sh SEE ALSO
! 111: .Xr execvp 3 ,
! 112: .Xr environ 7
! 113: .Sh STANDARDS
! 114: The
! 115: .Nm env
! 116: utility conforms to
! 117: .St -p1003.2-92 .
! 118: .Sh BUGS
! 119: .Nm Env
! 120: doesn't handle commands with equal
! 121: .Pq Dq =
! 122: signs in their
! 123: names, for obvious reasons.