Perhaps the most obvious shell with which to compare ksh93 is ksh88, the 1988 version of the Korn shell. This section briefly describes those features of ksh93 that are either different or nonexistent in ksh88. As with the presentation for the Bourne shell, the topics are covered in the same order as they're presented in the rest of the book.
Tilde substitution does not occur during variable expansion (${var op word}).
In emacs-mode, ESC ESC, ESC *, and ESC = don't work on the first word of a command line, i.e., there is no command completion facility. The ESC # command always prepends a # character. It never removes them.
Similarly, in vi-mode, the *, \ and = commands don't work on the first word of a command line, and the # command always prepends a # character. It never removes them.
Finally, there is no variable completion, the hist command is called fc, FCEDIT is used in place of HISTEDIT, and the HISTCMD variable is not available.
Alias tracking can be turned off in ksh88.
The -p option to alias is not present in ksh88, nor is the -a option to unalias.
The following built-in variables aren't supported:
.sh.edchar | .sh.match | .sh.version | LANG |
.sh.edcol | .sh.name | FIGNORE | LC_ALL |
.sh.edmode | .sh.subscript | HISTCMD | LC_COLLATE |
.sh.edtext | .sh.value | HISTEDIT | LC_CTYPE |
The command search order in ksh88 is keywords, aliases, all built-in commands, functions, and then external commands and scripts. The order was changed in ksh93 for POSIX compliance.
In ksh88, undefined (autoloaded) functions are searched for exclusively along the list in the FPATH variable, and PATH is not involved.
The .paths file feature is not available.
Many of the variable substitution features described in the main text are new to ksh93. Only the following are available in ksh88: ${name:-string}, ${name:=string}, ${name:?string}, ${name:+string}, ${name#pattern}, ${name##pattern}, ${name%pattern}, ${name%%pattern}, ${#name}, ${#name[*]}, and ${#name[@]}.
Compound variables, namerefs and the += operator for appending to a variable are not in ksh88.
The \n notation in patterns is not available, nor are non-greedy matching, the use of backslash escapes in patterns, options in subpatterns, nor any of the [:...:] character classes.
The .sh.match array is not available.
There is no command built-in command. To replace a built-in, you have to use an awkward combination of aliasing, functions, and quoting.
The set -o pipefail option and the the ! keyword for reversing the sense of a test are not available. Instead of the == operator for [[...]], ksh88 uses =.
The arithmetic for loop is not in ksh88. The use of ;& for falling through cases existed in ksh88 but was undocumented. The TMOUT variable existed in ksh88, but it only applied to the shell itself, not to the select loop or the read command.
The built-in arithmetic only supports integers, and the ++, --, ?: and comma operators aren't available. Numeric constants of the form base#number can only go up to base 36. There are no built-in arithmetic functions.
Only indexed arrays exist, and the maximum index is 1023.
<&n- | >&n- | <<< |
TCP/IP networking is available starting with ksh88e, but you must use IP addresses.
ksh88 does not have the printf command, nor the -A, -d, -n, and -t options to read. TMOUT does not affect read.
Brace expansion and process substitution are compile-time options that are generally not available in ksh88.
Locale translation with $"..." and ANSI C strings with $'...' are not available.
true and false are predefined aliases instead of built-in commands.
Functions and aliases are exported to shell subprocesses; this is not true of ksh93.
Discipline functions are not available.
You cannot customize the built-in editors; the KEYBD fake signal does not exist.
Copyright © 2003 O'Reilly & Associates. All rights reserved.