home | O'Reilly's CD bookshelfs | FreeBSD | Linux | Cisco | Cisco Exam  


Learning the Korn Shell

Learning the Korn ShellSearch this book
Previous: Korn Shell Versions Preface Next: Intended Audience
 

Summary of Korn Shell Features

The Korn shell is the most advanced of the shells that are "officially" distributed with UNIX systems. It's a backward-compatible evolutionary successor to the Bourne shell that includes most of the C shell's major advantages as well as a few new features of its own.

Features appropriated from the C shell include:

  • Job control , including the fg and bg commands and the ability to stop jobs with CTRL-Z.

  • Aliases , which allow you to define shorthand names for commands or command lines.

  • Functions (included in some C shell versions), which increase programmability and allow you to store your own shell code in memory instead of files.

  • Command history , which lets you recall previously entered commands.

The Korn shell's major new features include:

  • Command-line editing , allowing you to use vi or emacs -style editing commands on your command lines.

  • Integrated programming features : the functionality of several external UNIX commands, including test , expr , getopt , and echo , has been integrated into the shell itself, enabling common programming tasks to be done more cleanly and without creating extra processes.

  • Control structures , especially the select construct, which enables easy menu generation.

  • Debugging primitives that make it possible to write tools that help programmers debug their shell code.

  • Regular expressions , well known to users of UNIX utilities like grep and awk , have been added to the standard set of filename wildcards and to the shell variable facility.

  • Advanced I/O features , including the ability to do two-way communication with concurrent processes ( coroutines ).

  • New options and variables that give you more ways to customize your environment.

  • Increased speed of shell code execution.

  • Security features that help protect against "Trojan horses" and other types of break-in schemes.


Previous: Korn Shell Versions Learning the Korn Shell Next: Intended Audience
Korn Shell Versions Book Index Intended Audience

The UNIX CD Bookshelf Navigation The UNIX CD BookshelfUNIX Power ToolsUNIX in a NutshellLearning the vi Editorsed & awkLearning the Korn ShellLearning the UNIX Operating System