ksh and sh can execute commands from a terminal
(when -i is specified), from a file (when the
argument is an executable script), or
from standard input (if no arguments remain or if -s
Arguments are assigned in order to the positional parameters $1, $2, etc. If array assignment is in effect (-A or +A), arguments are assigned as array elements. If the first argument is an executable script, commands are read from it, and remaining arguments are assigned to $1, $2, etc.
Read commands from string
Create an interactive shell (prompt for input).
Start up as a privileged user (i.e., don't process $HOME/.profile).
Create a restricted shell (same as rksh or rsh).
Read commands from standard input; output from built-in commands goes to file descriptor 1; all other shell output goes to file descriptor 2.