1N/A.H 1 ksh93
1N/AKSH-93 is the most recent version of the KornShell Language
1N/Adescribed in
1N/A"The KornShell Command and Programming Language,"
1N/Aby Morris Bolsky and David Korn of AT&T Bell Laboratories, ISBN 0-13-182700-6.
1N/AThe KornShell is a shell programming language,
1N/Awhich is upward compatible with "sh" (the Bourne Shell),
1N/Aand is intended to conform to the IEEE P1003.2/ISO 9945.2 Shell and
1N/AUtilities standard.
1N/AKSH-93 provides an enhanced programming environment in
1N/Aaddition to the major command-entry features of the BSD
1N/Ashell "csh". With KSH-93, medium-sized programming tasks can be
1N/Aperformed at shell-level without a significant loss in performance.
1N/AIn addition, "sh" scripts can be run on KSH-93 without modification.
1N/A.P
1N/AThe code should conform to the IEEE POSIX 1003.1 standard and to the
1N/Aproposed ANSI-C standard so that it should be portable to all
1N/Asuch systems. Like the previous version, KSH-88,
1N/Ait is designed to accept eight bit character sets
1N/Atransparently, thereby making it internationally compatible.
1N/AIt can support multi-byte characters sets with some characteristics
1N/Aof the character set given at run time.
1N/A.P
1N/AKSH-93 provides the following features, many of which were also inherent
1N/Ain KSH-88:
1N/A.BL
1N/A.LI
1N/AEnhanced Command Re-entry Capability: The KSH-93 history
1N/Afunction records commands entered at any shell level and stores
1N/Athem, up to a user-specified limit, even after you log off.
1N/AThis allows you to re-enter long commands with a few keystrokes
1N/A- even those commands you entered yesterday.
1N/AThe history file allows for eight bit characters in
1N/Acommands and supports essentially unlimited size histories.
1N/A.LI
1N/AIn-line Editing: In "sh", the only way to fix mistyped
1N/Acommands is to backspace or retype the line. KSH-93 allows you
1N/Ato edit a command line using a choice of EMACS-TC or "vi"
1N/Afunctions.
1N/AYou can use the in-line editors to complete filenames as
1N/Ayou type them.
1N/AYou may also use this editing feature when entering
1N/Acommand lines from your history file.
1N/AA user can capture keystrokes and rebind keys to customize the
1N/Aediting interface.
1N/A.LI
1N/AExtended I/O Capabilities: KSH-93 provides several I/O
1N/Acapabilities not available in "sh", including the ability to:
1N/A.BL
1N/A.LI
1N/Aspecify a file descriptor for input and output
1N/A.LI
1N/Astart up and run co-processes
1N/A.LI
1N/Aproduce a prompt at the terminal before a read
1N/A.LI
1N/Aeasily format and interpret responses to a menu
1N/A.LI
1N/Aecho lines exactly as output without escape processing
1N/A.LI
1N/Aformat output using printf formats.
1N/A.LI
1N/Aread and echo lines ending in "\e".
1N/A.LE
1N/A.LI
1N/AImproved performance: KSH-93 executes many scripts faster
1N/Athan the System V Bourne shell. A major reason for this is
1N/Athat many of the standard utilities are built-in.
1N/ATo reduce the time to initiate a command, KSH-93 allows
1N/Acommands to be added as built-ins at run time
1N/Aon systems that support dynamic loading such as System V Release 4.
1N/A.LI
1N/AArithmetic: KSH-93 allows you to do integer arithmetic in any
1N/Abase from two to sixty-four. You can also do double
1N/Aprecision floating point arithmetic.
1N/AAlmost the complete set of C language operators are available
1N/Awith the same syntax and precedence.
1N/AArithmetic expressions can be used to as an argument expansion
1N/Aor as a separate command.
1N/AIn addition there is an arithmetic for command that works
1N/Alike the for statement in C.
1N/A.LI
1N/AArrays: KSH-93 supports both indexed and associative arrays.
1N/AThe subscript for an indexed array is an arithmetic expression,
1N/Awhereas, the subscript for an associative array is a string.
1N/A.LI
1N/AShell Functions and Aliases: Two mechanisms - functions and
1N/Aaliases - can be used to assign a user-selected identifier to
1N/Aan existing command or shell script.
1N/AFunctions allow local variables and provide scoping
1N/Afor exception handling.
1N/AFunctions can be searched for and loaded on first reference the
1N/Away scripts are.
1N/A.LI
1N/ASubstring Capabilities: KSH-93 allows you to create a
1N/Asubstring of any given string either by specifying the starting
1N/Aoffset and length, or by stripping off leading
1N/Aor trailing substrings during parameter substitution.
1N/AYou can also specify attributes, such as upper and lower case,
1N/Afield width, and justification to shell variables.
1N/A.LI
1N/AMore pattern matching capabilities: KSH-93 allows you to specify
1N/Aextended regular expressions for file and string matches.
1N/A.LI
1N/AKSH-93 uses a hierarchal name space for variables.
1N/ACompound variables can be defined and variables can
1N/Abe passed by reference. In addition, each variable
1N/Acan have one or more disciplines associated with
1N/Ait to intercept assignments and references.
1N/A.LI
1N/AImproved debugging: KSH-93 can generate line numbers on execution
1N/Atraces. Also, I/O redirections are now traced.
1N/AThere is a DEBUG trap that gets evaluated before each command
1N/Aso that errors can be localized.
1N/A.LI
1N/AJob Control: On systems that support job control, including
1N/ASystem V Release 4, KSH-93
1N/Aprovides a job-control mechanism almost identical to that of
1N/Athe BSD "csh", version 4.1.
1N/AThis feature allows you
1N/Ato stop and restart programs, and to move programs between the
1N/Aforeground and the background.
1N/A.LI
1N/AAdded security:
1N/AKSH-93 can execute scripts which do not have read permission
1N/Aand scripts which have the setuid and/or setgid set when
1N/Ainvoked by name, rather than as an argument to the shell.
1N/AIt is possible to log or control the execution of setuid and/or
1N/Asetgid scripts.
1N/AThe noclobber option prevents you from accidentally erasing
1N/Aa file by redirecting to an existing file.
1N/A.LI
1N/AKSH-93 can be extended by adding built-in commands at run time.
1N/AIn addition, KSH-93 can be used as a library that can
1N/Abe embedded into an application to allow scripting.
1N/A.LE
1N/ADocumentation for KSH-93 consists of an "Introduction to KSH-93",
1N/A"Compatibility with the Bourne Shell" and a manual page and a
1N/AREADME file. In addition, the "New KornShell Command and Programming
1N/ALanguage," book is available from Prentice Hall.
1N/A