Usage: ksh [ options ] [arg ...] Help: ksh [ --help | --man ] 2>&1 OPTIONS -c Read and execute a script from the first arg instead of a file. The second arg, if present, becomes that script's command name ($0). Any third and further args become positional parameters starting at $1. -s Read and execute a script from standard input instead of a file. The command name ($0) cannot be set. Any args become the positional parameters starting at $1. This option is forced on if no arg is given and is ignored if -c is also specified. -i Specifies that the shell is interactive. -l Invoke the shell as a login shell; /etc/profile and $HOME/.profile, if they exist, are read before the first command. -r Invoke the shell in a restricted mode. A restricted shell does not permit any of the following: - Changing the working directory. - Setting values or attributes of the variables SHELL, ENV, FPATH, or PATH. - Executing any command whose name as a / in it. - Redirecting output of a command with >, >|, <>, or >>. - Adding or deleting built-in commands or libraries with builtin. - Executing command -p ... . -D Do not execute the script, but output the set of double quoted strings preceded by a $. These strings are needed for localization of the script to different locales. -E Reads the file ${ENV-$HOME/.kshrc}, if it exists, as a profile. On by default for interactive shells; use +E to disable. -a All variables that are assigned a value while this option is on are automatically exported, unless they have a dot in their name. -b The shell writes a message to standard error as soon it detects that a background job completes rather than waiting until the next prompt. -e A simple command that has an non-zero exit status will cause the shell to exit unless the simple command is: + contained in an && or || list. + the command immediately following if, while, or until. + contained in the pipeline following !. -f Pathname expansion is disabled. -h Obsolete; no effect. -k All arguments of the form name=value are removed and placed in the variable assignment list for the command. Ordinarily, variable assignments must precede command arguments. -m When enabled, the shell runs background jobs in a separate process group and displays a line upon completion. This mode is enabled by default for interactive shells. -n The shell reads commands and checks for syntax errors, but does not execute the command. Usually specified on command invocation. -o[option] A -o with no option will write the list of options and their current settings to standard output. A +o with no option writes a command that the shell can run to restore the current options state. -o option or --option turns an option on, whereas +o option, -o nooption or --nooption turns it off. This can be repeated to enable/disable multiple options. The option name is case-sensitive but insensitive to - and _, and may be abbreviated to a non-arbitrary string. It must resolve to one of the following: allexport Equivalent to -a. backslashctrl The backslash character \ escapes the next control character in the emacs built-in editor and the next erase or kill character in the vi built-in editor. On by default. bgnice Runs background jobs at lower priorities. braceexpand Equivalent to -B. clobber Opposite of -C. emacs Enables/disables emacs editing mode. errexit Equivalent to -e. exec Opposite of -n. functrace Function scopes and subshells inherit the parent environment's DEBUG trap action. Function scopes inherit the -x option's state. glob Opposite of -f. globcasedetect Pathname expansion and file name completion automatically become case-insensitive on file systems where the difference between upper- and lowercase is ignored for file names. Each slash-separated path name component pattern p is treated as ~(i:p) if its parent directory exists on a case-insensitive file system. globstar Equivalent to -G. gmacs Enables/disables gmacs editing mode. gmacs editing mode is the same as emacs editing mode except for the handling of ^T. histexpand Equivalent to -H. histreedit If a history expansion (see -H) fails, the command line is reloaded into the next prompt's edit buffer, allowing corrections. histverify The results of a history expansion (see -H) are not immediately executed. Instead, the expanded line is loaded into the next prompt's edit buffer, allowing further changes. ignoreeof Prevents an interactive shell from exiting on reading an end-of-file. keyword Equivalent to -k. letoctal The let builtin recognizes octal constants with leading 0. markdirs A trailing / is appended to directories resulting from pathname expansion. monitor Equivalent to -m. multiline Use multiple lines when editing lines that are longer than the window width. Has no effect on systems with neither terminfo nor termcap support for the running terminal. log Obsolete; no effect. notify Equivalent to -b. pipefail A pipeline will not complete until all components of the pipeline have completed, and the exit status of the pipeline will be the value of the last command to exit with non-zero exit status, or will be zero if all commands return zero exit status. posix Enable full POSIX standard compliance mode. privileged Equivalent to -p. showme Simple commands preceded by a ; will be traced as if -x were enabled but not executed. trackall Equivalent to -h. unset Opposite of -u. verbose Equivalent to -v. vi Enables/disables vi editing mode. viraw Obsolete; no effect. xtrace Equivalent to -x. The option value may be omitted. --posix Enable the posix option. When given at invocation time, disables importing variable type attributes from the environment. -p Privileged mode. Disabling -p sets the effective user ID to the real user ID, and the effective group ID to the real group ID. Enabling -p restores the effective user and group IDs to their values when the shell was invoked. The -p option is on whenever the real and effective user ID is not equal or the real and effective group ID is not equal. User profiles are not processed when -p is enabled. -r restricted. Enables restricted shell. This option cannot be unset once enabled. -t Obsolete. The shell reads one command and then exits. -u If enabled, the shell displays an error message when it tries to expand a variable that is unset. -v Verbose. The shell displays its input onto standard error as it reads it. -x Execution trace. The shell will display each command after all expansion and before execution preceded by the expanded value of the PS4 parameter. -B Enable {...} group expansion. On by default. -C Prevents existing regular files from being overwritten using the > redirection operator. The >| redirection overrides this noclobber option. -G Causes ** by itself to also match all subdirectories during pathname expansion. -H Enable !-style history expansion similar to csh.