Invokes the restricted version of the Bourne shell.
Rsh [ -i ] [ { + | - } { [ a ] [ e ] [ f ] [ h ] [ k ] [ n ] [ t timeout ] [ u ] [ v ] [ x ] } ] [ -c String | -s | File [ Parameter ] ]
The Rsh command invokes a restricted version of the Bourne shell, which is useful for installations that require a more controlled shell environment. The restricted shell allows you to create user environments with a limited set of privileges and capabilities.
For more information about the Bourne shell, see "Bourne shell" in Operating system and device management.
The Bourne shell interprets the following flags only when the shell is invoked at the command line.
-a | Marks for export all variables to which an assignment is performed. If the assignment precedes a command name, the export attribute is effective only for that command's execution environment, except when the assignment precedes one of the special built-in commands. In this case, the export attribute persists after the built-in command has completed. If the assignment does not precede a command name, or if the assignment is a result of the operation of the getopts or read command, the export attribute persists until the variable is unset. |
-c String | Runs commands read from the String variable. Sets the value of special parameter 0 from the value of the String variable and the positional parameters ($1, $2, and so on) in sequence from the remaining Parameter operands. The shell does not read additional commands from standard input when you specify this flag. |
-e | Exits immediately if all of the following conditions exist for a command: |
-f | Disables file name substitution. |
-h | Locates and remembers the commands called within functions as the functions are defined. (Usually these commands are located when the function is executed; see the hash command.) |
-i | Makes the shell interactive, even if input and output are not from a workstation. In this case the shell ignores the TERMINATE signal, so that the kill 0 command does not stop an interactive shell, and traps an INTERRUPT signal, so you can interrupt the function of the wait command. In all cases, the shell ignores the QUIT signal. |
-k | Places all keyword parameters in the environment for a command, not just those preceding the command name. |
-n | Reads commands but does not execute them. The -n flag can be used to check for shell-script syntax errors. An interactive shell may ignore this option. |
-s | Reads commands from standard input. Any remaining parameters specified are passed as positional parameters to the new shell. Shell output is written to standard error, except for the output of built-in commands. |
-t timeout | Exits after the timeout seconds if there is no reply from the server. |
-u | Treats an unset variable as an error and immediately exits when performing variable substitution. An interactive shell does not exit. |
-v | Displays shell input lines as they are read. |
-x | Displays commands and their arguments before they are executed. |
The env command, sh command, bsh command.
The /etc/passwd file, null special file, environment file.
The profile file format.
Bourne shell in Operating system and device management.
Bourne shell built-in commands in Operating system and device management.
Variable substitution in the Bourne shell in Operating system and device management.