After the character-device driver processes what you type, the command line is passed to a command interpreter or shell.
The default shell is sh, which under QNX Neutrino is a link to the Korn shell, ksh. There are other shells available, including small ones that are suitable for situations with limited memory:
Here's a brief comparison of the features that the shells support:
Feature | uesh | esh | fesh | ksh |
---|---|---|---|---|
Interactive mode | Yes | Yes | Yes | Yes |
Script files | Yes | Yes | Yes | Yes |
Redirection | Yes | Yes | Yes | Yes |
Pipes | — | Yes | Yes | Yes |
Aliases | — | Yes | Yes | Yes |
Filename expansion | — | Yes | Yes | Yes |
Parameter substitution | — | Yes | Yes | Yes |
Compound commands | — | — | — | Yes |
Command or arithmetic substitution | — | — | — | Yes |
Command and filename completion | — | — | — | Yes |
Tilde expansion | — | — | — | Yes |
Brace expansion | — | — | — | Yes |
Coprocesses | — | — | — | Yes |
Functions | — | — | — | Yes |
emacs interactive command-line editing | — | — | — | Yes |
Job control | — | — | — | Yes |
The small shells have fewer builtin commands than ksh has. For more information about these shells, see the Utilities Reference.
In general terms, the shell breaks the command line into tokens, parses them, and invokes the program or programs that you asked for. The specific details depend on the shell that you're using; this section describes what ksh does.
As you type, the Korn shell immediately processes the keys that you use to edit the command line, including completing commands and filenames. When you press Enter, the shell processes the command line:
You can also specify multiple commands on the command line.
To override the order in which the shell processes the command line, you use quoting to change the meaning of the special characters.
The sections that follow give the briefest descriptions of these steps—ksh is a very powerful command interpreter! For more details, see its entry in the Utilities Reference.