BSD 4_3_Reno release
[unix-history] / usr / src / share / man / man7 / environ.7
index 62210a4..7d166a1 100644 (file)
-.\" Copyright (c) 1983 Regents of the University of California.
-.\" All rights reserved.  The Berkeley software License Agreement
-.\" specifies the terms and conditions for redistribution.
+.\" Copyright (c) 1983, 1990 The Regents of the University of California.
+.\" All rights reserved.
 .\"
 .\"
-.\"    @(#)environ.7   6.1 (Berkeley) %G%
+.\" Redistribution and use in source and binary forms are permitted provided
+.\" that: (1) source distributions retain this entire copyright notice and
+.\" comment, and (2) distributions including binaries display the following
+.\" acknowledgement:  ``This product includes software developed by the
+.\" University of California, Berkeley and its contributors'' in the
+.\" documentation or other materials provided with the distribution and in
+.\" all advertising materials mentioning features or use of this software.
+.\" Neither the name of the University nor the names of its contributors may
+.\" be used to endorse or promote products derived from this software without
+.\" specific prior written permission.
+.\" THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED
+.\" WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
+.\" MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.
 .\"
 .\"
-.TH ENVIRON 7 ""
-.UC 5
-.SH NAME
-environ \- user environment
-.SH SYNOPSIS
-.B extern char **environ;
-.SH DESCRIPTION
-An array of strings called the `environment' is made available by
-.IR execve (2)
+.\"     @(#)environ.7  6.5 (Berkeley) 6/24/90
+.\"
+.Dd June 24, 1990
+.Dt ENVIRON 7
+.Os BSD 4.2
+.Sh NAME
+.Nm environ
+.Nd user environment
+.Sh SYNOPSIS
+.Ar extern char **environ ;
+.Sh DESCRIPTION
+An array of strings called the
+.Ar environment
+is made available by
+.Xr execve  2
 when a process begins.  By convention these strings have the form
 when a process begins.  By convention these strings have the form
-.RI ` name = value '.
+.Dq Ar name=value .
 The following names are used by various commands:
 The following names are used by various commands:
-.TP "\w'TERMCAP 'u"
-PATH
-The sequence of directory prefixes that
-.I sh, time,
-.IR nice (1),
-etc., apply in searching for a file known by an incomplete path name.
-The prefixes are separated by `:'.
-.IR Login (1)
-sets PATH=:/usr/ucb:/bin:/usr/bin.
-.TP
-HOME
+.Tw Fl
+.Tp Ev EXINIT
+A startup list of commands read by
+.Xr ex  1  ,
+.Xr edit  1 ,
+and
+.Xr vi  1  .
+.Tp Ev HOME
 A user's login directory, set by
 A user's login directory, set by
-.IR login (1)
+.Xr login  1
 from the password file
 from the password file
-.IR passwd (5).
-.TP
-TERM
+.Xr passwd  5  .
+.Tp Ev PATH
+The sequence of directories, separated by colons, searched by
+.Xr csh  1  ,
+.Xr sh  1 ,
+.Xr system  3  ,
+.Xr execvp  3 ,
+etc, when looking for an executable file.
+PATH is set to ``:/usr/ucb:/bin:/usr/bin'' initially by
+.Xr login  1  .
+.Tp Ev PRINTER
+The name of the default printer to be used by
+.Xr lpr  1  ,
+.Xr lpq  1 ,
+and
+.Xr lprm  1  .
+.Tp Ev SHELL
+The full pathname of the user's login shell.
+.Tp Ev TERM
 The kind of terminal for which output is to be prepared.
 This information is used by commands, such as
 The kind of terminal for which output is to be prepared.
 This information is used by commands, such as
-.I nroff
+.Xr nroff  1
 or
 or
-.IR plot (1G),
+.Xr plot 1
 which may exploit special terminal capabilities.  See
 which may exploit special terminal capabilities.  See
-.I /etc/termcap
-.RI ( termcap (5))
+.Pa /usr/share/misc/termcap
+.Pq Xr tmercap 5
 for a list of terminal types.
 for a list of terminal types.
-.TP
-SHELL
-The file name of the users login shell.
-.TP
-TERMCAP
-The string describing the terminal in TERM, or the name of the termcap file, see
-.IR termcap (5), termcap (3X).
-.TP
-EXINIT
-A startup list of commands read by
-.IR ex (1),
-.IR edit (1),
+.Tp Ev TERMCAP
+The string describing the terminal in TERM, or, if
+it begins with a '/', the name of the termcap file.
+See
+.Ev TERMPATH
+below,
+.Xr termcap  5  ,
 and
 and
-.IR vi (1).
-.TP
-USER
+.Xr termcap  .
+.Tp Ev TERMPATH
+A sequence of pathnames of termcap files, separated by colons or spaces,
+which are searched for terminal descriptions in the order listed.  Having
+no
+.Ev TERMPATH
+is equivalent to a
+.Ev TERMPATH
+of
+.Dq Pa $HOME/.termcap:/etc/termcap .
+.Ev TERMPATH
+is ignored if
+.Ev TERMCAP
+contains a full pathname.
+.Tp Ev USER
 The login name of the user.
 The login name of the user.
-.TP
-PRINTER
-The name of the default printer to be used by
-.IR lpr (1),
-.IR lpq (1),
-and
-.IR lprm (1).
-.PP
+.Tp
+.Pp
 Further names may be placed in the environment by the
 Further names may be placed in the environment by the
-.I export
-command and `name=value' arguments in
-.IR sh (1),
+.Xr export
+command and
+.Ar name=value
+arguments in
+.Xr sh  1  ,
 or by the
 or by the
-.I setenv
+.Xr setenv
 command if you use
 command if you use
-.IR csh (1).
-Arguments may also be placed in the environment at the point of an
-.IR execve (2).
-It is unwise to conflict with certain 
-.IR sh (1)
-variables that are frequently exported by `.profile' files:
-MAIL, PS1, PS2, IFS.
-.SH SEE ALSO
-csh(1),
-ex(1),
-login(1),
-sh(1),
-execve(2),
-system(3),
-termcap(3X),
-termcap(5)
+.Xr csh  1  .
+It is unwise to change certain
+.Xr sh  1
+variables that are frequently exported by
+.Pa .profile
+files, such as
+.Ev MAIL ,
+.Ev PS1 ,
+.Ev PS2 ,
+and
+.Ev IFS ,
+unless you know what you are doing.
+.Sh SEE ALSO
+.Xr csh 1 ,
+.Xr ex 1 ,
+.Xr login 1 ,
+.Xr sh 1 ,
+.Xr execve 2 ,
+.Xr execle 3 ,
+.Xr system 3 ,
+.Xr termcap 3 ,
+.Xr termcap 5
+.Sh HISTORY
+.Nm Environ
+appeared in 4.2 BSD.