Index Click this button to go to the index for this section.


sh(1)

NAME

sh - Shell, the standard command language interpreter

STANDARDS

Interfaces documented on this reference page conform to industry standards as follows: sh: XPG4, XPG4-UNIX, POSIX.2 Refer to the standards(5) reference page for more information about industry standards and associated tags.

DESCRIPTION

[DIGITAL] DIGITAL UNIX provides two command interpreters with the name sh. The XPG4 and POSIX.2 compliant command interpreter sh is available in the file /usr/bin/posix/sh and is described in the sh(1p) reference page. The Bourne shell, historically known as sh, is available in the file /usr/bin/sh and is described in the sh(1b) reference page. [DIGITAL] Your initial, or login, shell is determined by your entry in the file /etc/passwd. This file can be changed only by your system administrator. You must use whatever procedures are in place at your location to have this entry changed. [DIGITAL] If available on your system, you may use the passwd -s or the chsh commands to change your login shell. Note This option is not available if your site manages passwords through the Network Information Service (NIS) facility. Check with your system administrator. [DIGITAL] Subsequent shells spawned from the initial shell depend on the value in the environment variable BIN_SH. If this variable is set to xpg4, the POSIX shell is started. If this variable is set to svr4, an SVR4 compliant version of the shell is started. If this variable is unset, the Bourne shell is started. If this variable is set to any other value, an error is reported and the results are unpredictable. See the EXAMPLES section for information on setting this variable.

NOTES

[DIGITAL] With DIGITAL UNIX Version 4.0 the Korn shell, /usr/bin/ksh is the same as the POSIX shell /usr/bin/posix/sh.

RESTRICTIONS

[DIGITAL] The file /etc/shells must include entries for both the POSIX shell /usr/bin/posix/sh and the Bourne shell, /usr/bin/sh. If this file is incorrect, see your system administrator.

EXAMPLES

1. Using the Bourne, Korn, or POSIX shell, to set the variable BIN_SH to use the POSIX/XPG4 compliant shell, enter: BIN_SH=xpg4 export BIN_SH 2. Using the Bourne, Korn, or POSIX shell, to set the variable BIN_SH to use the SVR4 compliant shell, enter: BIN_SH=svr4 export BIN_SH 3. Using the Bourne, Korn, or POSIX shell, to unset the variable BIN_SH, enter: unset BIN_SH 4. Using the C/ shell, to set the variable BIN_SH to use the POSIX/XPG4 compliant shell, enter: setenv BIN_SH xpg4 5. Using the C/ shell, to set the variable BIN_SH to use the SVR4 compliant shell, enter: setenv BIN_SH svr4 6. Using the C/ shell, to unset the variable BIN_SH, enter: unsetenv BIN_SH

FILES

$HOME/.profile User profile. /etc/passwd Contains user information, including the login shell name. /etc/shells Contains the names of available and permitted shells.

SEE ALSO

Commands: csh(1), ksh(1), Bourne shell sh(1b), POSIX shell sh(1p), passwd(1) Files: passwd(4), shells(4) Standards: standards(5)