Invokes the restricted version of the Korn shell.
rksh [ -i ] [ { + | - } { a e f h k m n p t u v x } ] [ -o Option ... ] [ -c String | -s | File [ Parameter ] ]
The rksh command invokes a restricted version of the Korn shell. It allows administrators to provide a controlled shell environment to the users. There is also a restricted version of rksh available for the enhanced Korn shell, called rksh93.
For more information about the restricted Korn shell, refer to Restricted Korn shell in AIX® Version 7.1 Operating system and device management.
Item | Description |
---|---|
-a | Exports automatically all subsequent parameters that are defined. |
-c String | Causes the Korn shell to read commands from the String variable. This flag cannot be used with the -s flag or with the File[Parameter] parameter. |
-e | Executes the ERR trap, if set, and exits if a command has a nonzero exit status. This mode is disabled while reading profiles. |
-f | Disables file name substitution. |
-h | Designates each command as a tracked alias when first encountered. |
-i | Indicates that the shell is interactive. An interactive shell is also indicated if shell input and output are attached to a terminal (as determined by the ioctl subroutine). In this case, the TERM environment variable is ignored (so that the kill 0 command does not kill an interactive shell) and the INTR signal is caught and ignored (so that a wait state can be interrupted). In all cases, the QUIT signal is ignored by the shell. |
-k | Places all parameter assignment arguments in the environment for a command, not just those arguments that precede the command name. |
-m | Runs background jobs in a separate process and prints a line upon completion. The exit status of background jobs is reported in a completion message. On systems with job control, this flag is turned on automatically for interactive shells. |
-n | Reads commands and checks them for syntax errors, but does not execute them. This flag is ignored for interactive shells. |
-o Option | Prints the current option settings and an error message if
you do not specify an argument. You can use this flag to enable any
of the following options:
You can set more than one option on a single rksh command line. |
-p | Disables the processing of the $HOME/.profile file when you use the shell as a login shell. |
-s | Causes the rksh command to read commands from the standard input. Shell output, except for the output of the special commands, is written to file descriptor 2. This parameter cannot be used with the -c flag or with the File[Parameter] parameter. |
-t | Exits after reading and executing one command. |
-u | Treats unset parameters as errors when substituting. |
-v | Prints shell input lines as they are read. |
-x | Prints executed commands and their arguments. |
Item | Description |
---|---|
/usr/bin/rksh | Contains the path name to the restricted Korn shell. |
/tmp/sh* | Contains temporary files that are created when a shell is opened. |