HP-UX Reference (11i v1 00/12) - 1 User Commands N-Z (vol 2)
__________________________________________________________________________________________________________________________________________________________________________________________________
__________________________________________________________________________________________________________________________________________________________________________________________________
STANDARD Printed by: Nora Chuang [nchuang] STANDARD
/build/1111/BRICK/man1/neqn.1
________________________________________________________________
___ ___
s
sh-bourne(1) sh-bourne(1)
The options below are interpreted by the shell at invocation (thus they cannot be used with the set com-
mand). Unless the -c or -s option is specified, the first non-option argument is assumed to be the name
of a file containing commands, and the remaining arguments are passed as positional parameters to that
command file.
-c string If the -c option is present then commands are read from string.
-s If the -s option is present or if no arguments remain, commands are read from the stan-
dard input. Any remaining arguments specify the positional parameters. Shell output
(except for "Special Commands" ) is written to file descriptor 2.
-i If the -i option is present or if the shell input and output are attached to a terminal, this
shell is interactive. In this case TERMINATE is ignored (so that kill 0 does not kill an
interactive shell) and INTERRUPT is caught and ignored (so that wait is interruptible).
In all cases, QUIT is ignored by the shell.
-r If the -r option is present the shell is a restricted shell.
The remaining options and arguments are described under the set command above.
rsh Only
rsh is used to set up login names and execution environments whose capabilities are more controlled than
those of the standard shell. The actions of rsh are identical to those of sh, except that the following are
disallowed:
• Changing directory (see cd(1)),
• Setting the value of
$PATH,
• Specifying path or command names containing /,
• Redirecting output (> and >>).
The restrictions above are enforced after .profile is interpreted.
When a command to be executed is found to be a shell procedure, rsh invokes sh to execute it. Thus, it
is possible to provide to the end-user shell procedures that have access to the full power of the standard
shell, while imposing a limited menu of commands; this scheme assumes that the end-user does not have
write and execute permissions in the same directory.
The net effect of these rules is that the writer of the
.profile has complete control over user actions, by
performing guaranteed setup actions and leaving the user in an appropriate directory (probably not the
login directory).
The system administrator often sets up a directory of commands (such as
/usr/rbin) that can be safely
invoked by
rsh. Commands such as vi, sh, ksh, csh, and such that can break
rsh restrictions should
not be included in that directory. Some systems also provide a restricted editor
red.
EXTERNAL INFLUENCES
Environment Variables
LC_COLLATE determines the collating sequence used in evaluating pattern matching notation for file
name generation.
LC_CTYPE determines the interpretation of text as single and/or multi-byte characters, the classification
of characters as letters, and the characters matched by character class expressions in pattern matching
notation.
LANG determines the language in which messages are displayed.
If LC_COLLATE or LC_CTYPE is not specified in the environment or is set to the empty string, the value
of LANG is used as a default for each unspecified or empty variable. If LANG is not specified or is set to the
empty string, a default of "C" (see lang(5)) is used instead of LANG. If any internationalization variable
contains an invalid setting, sh behaves as if all internationalization variables are set to "C". See
environ(5).
International Code Set Support
Single- and multi-byte character code sets are supported.
RETURN VALUE
The error codes returned by the shell are:
Section 1−−842 − 8 − HP-UX Release 11i: December 2000
___
___