The KornShell

Command and Programming Language

Morris I. Bolsky, David G. Korn

Publisher: Prentice Hall, 1989, 356 pages

ISBN: 0-13-516972-0

Keywords: Programming

Last modified: May 3, 2021, 4:18 p.m.

This book is the specification of the KornShell language and a reference handbook for ksh, the program that implements the KornShell language. This book also contain a Tutorial that describes both of the functions of ksh: as an interactive command language, and as a programming language. It contains numerous examples illustrating the features of ksh, and many chapters ahve exercises. It also contains a Quick Reference summary of the KornShell language, including page references in the book.

This book is intended both for new users with little computer or shell experience, and for experienced computer users who are familiar with ksh and/or other shells. For new users, it has considerable tutorial material. For all users, it is a comprehensive reference handbook.

  • Part I — Introduction
    1. About the KornShell Language
      • What is a Shell?
      • How to obtain ksh
      • Benefits of Using ksh
        • Improvements as a Command Language
        • Improvements as a Programming Language
      • Version to Which this Book Applies
    2. Notations Used in This Book
      • General
      • Keys on Terminal
      • Type Fonts Used in this Book
      • Symbolic Names for Constants
      • Command Syntax Notation
  • Part II — Tutorial
    1. Files and Processes
      • The File System Model
        • Naming Conventions
        • Special Directories
        • File Permissions
        • File Descriptors
        • Special Files
      • Processes
        • Creating and Destroying Processes
        • Process Relationships
        • Process Permissions
        • Signals
        • Interprocess Communication
        • Process Environment
      • Exercises
    2. Command Language
      • Executing Simple Commands
      • Setting and Displaying Options
      • Correcting Your Typing
      • Using Aliases as Shorthand
      • Reentering Previous Commands
      • Exercises
      • Redirecting Input and Output
      • Pipelines and Filters
      • Tilde Expansion
      • Pathname Expansion
      • Timing Commands
      • Exercises
      • Shell Parameters
      • Quoting Special Characters
      • Working Directory
      • How ksh Finds a Command
      • Command Substitution
      • Running Commands in Background
      • Job Control
      • Compound Commands
      • Exercises
    3. Programming Language
      • Creating and Running a Shell Script
      • Positional Parameters
      • More About Parameters
      • More on Quoting
      • Opening and Closing Files
      • Reading from Terminals and Files
      • Writing to Terminals and Files
      • Here-Documents
      • Return Values
      • Grouping Commands
      • Compound Commands
      • Testing Files and Strings
      • Arithmetic
      • Arrays
      • Creating and Using Menus
      • Using eval
      • Exercises
      • Setting Traps to Catch Interrupts
      • Processing Arguments
      • Co-Processes
      • Dot Scripts
      • Pattern Matching
      • Defining and Using Functions
      • Auto-Load Functions
      • Functions and Aliases
      • Debugging
      • Exercises
    4. Customizing Your Environment
      • History File
      • Login Environment (Profile)
      • Environment File
      • Customizing Your Prompt
      • Changing Directories
      • Improving Performance
      • Exercises
  • Part III — The Built-In Editors
    1. Introduction
      • Terninal requirements
      • How to Use the Built-In Editors
      • Turning On/Off Built-In Editors
      • Difference Between Built-In Editors
    2. emacs Built-In Editor
      • Moving the Cursor
      • Deleting
      • Marking, Yanking, and Putting
      • Miscellaneous
      • Fetching Old History File Line
    3. vi Built-In Editor
      • Character and Line Input
      • Input Mode
      • Miscellaneous Control Mode Directives
      • Moving the Cursor
      • Moving the Character
      • Adding and Changing
      • Replace
      • X/Delete
      • Yank/Put
      • Undo
      • Fetching Previous Commands
  • Part IV — Programming Language
    1. Syntax
      • Newlines
      • Format
      • Comments
      • Special Characters
      • Operators
      • Reserved Words
      • Identifiers
      • Alias Names
      • Variable Assignments
      • Patters
      • Arithmetic Expressions
      • Conditional Expression Primitives
      • Quoting
        • \ Escape Character
        • \Newline Line Continuation
        • '…' Literal (Single) Quotes
        • "…" Grouping (Double) Quotes
        • `…` Old Command Substitution
        • $(…) New Command Substitution
        • ${…} Parameter Expansion
        • ( (…) ) Arithmetic Evaluation
        • Identifier[…]= Array Variable Assignment
      • I/O Redirection
        • Reading
        • Here-Document
        • Duplicating Input
        • Reading/Writing
        • Writing
        • Appending
        • Duplicating Output
      • Exercises
    2. Command Processing
      • Reading Commands
        • Splitting Input into Commands
        • Splitting Input into Tokens
        • Determining the Type of a Command
        • Reading Simple Commands
        • Alias Substitution
        • Preset Aliases
        • Tile Expansion
      • Expanding a Simple Command
        • Command Substitution
        • Parameter Expansion
        • Word Splitting
        • Pathname Expansion
        • Quote Removal
      • Executing a Simple Command
        • No Command Name or Arguments
        • Built-in Commands
        • Functions
        • Tracked Aliases
        • Programs
      • Exercises
    3. Compound Commands
      • Pipeline Command
      • Time Command
      • List Command
      • Conditional Commands
        • [ [] ]
        • ifthenelsefi
        • caseesac
      • Iteration Commands
        • fordodone
        • selectdodone
        • whiledodone
        • untildodone
      • Command Grouping
        • () Subshell Grouping
        • {} Brace Grouping
      • Function Definition
      • Exercises
    4. Parameters
      • Parameter Classes
        • Named Parameters (Variables)
        • Positional Parameters
        • Special Parameters
      • Attributes
      • Arrays
      • Parameter Expansion — Introduction
      • Parameter Expansion — Basic
      • Parameter Expansion — Modifiers
      • Parameter Expansion — Substrings
      • Parameter Expansion — Other
      • Special Parameters Set By ksh
      • Variables Set By ksh
      • Variables Used By ksh
    5. Built-In Commands
      • Introduction
      • Declarations
        • alias
        • export
        • readonly
        • typeset
        • unalias
        • unset
      • Positional Parameters and Options
        • set
        • shift
      • Control Flow
        • Dot Command
        • break
        • continue
        • eval
        • exit
        • return
        • trap
      • Input/Output
        • echo
        • exec
        • print
        • read
      • Operating System — Environment
        • cd
        • pwd
        • times
        • ulimit
        • umask
      • Operating System — Job Control
        • bg
        • fg
        • jobs
        • kill
        • wait
      • Miscellaneous
        • Null Command
        • fc
        • getopts
        • let
        • newgrp
        • test
        • Left Bracket Command
        • whence
    6. Other Commands
      • Commands
        • cat
        • chmod
        • cp
        • date
        • ed
        • find
        • grep
        • ln
        • lp
        • lpr
        • ls
        • mail
        • mkdir
        • more
        • mv
        • pg
        • rm
        • rmdir
        • sleep
        • sort
        • stty
        • tail
        • tee
        • tr
        • uniq
        • wc
        • what
        • who
      • Exercises
    7. Invocation and Environment
      • Environment
      • Shell Invocation
        • Inheritance
        • Positional Parameters
        • Invocation Line Options
        • Environment File
        • History File
      • Login Shells
      • Restricted Shells
      • Shell Scripts
      • Subshells
      • Shell Functions
      • Dot Scripts
      • Built-In Commands
  • Part V — Application Programming
    1. Shell Functions and Programs
      • Sample Login Profile
      • Sample Environment File
      • pushd, popd, and dirs
      • An Enhanced cd Interface
      • Shell Version of cat Command
      • Shell Version of grep Command
      • Shell Version of nohup Command
      • Exercises
    2. A Complete Application
      • The MH Message Handling System
      • Design
      • Implementation
      • Exercises
  • Part VI — Appendix
    1. Glossary
    2. Quick Reference
    3. Portability
      • Features of ksh Not in Bourne Shell
      • Features of ksh Not in System V Shell
      • Compatibility of ksh with System V Shell
      • New Features in 11/16/88 Version of ksh
      • Obsolescent Features
      • Possible Extensions
    4. Character Set

Reviews

The KornShell

Reviewed by Roland Buresund

OK ***** (5 out of 10)

Last modified: May 21, 2007, 3:18 a.m.

The definitive reference on the subject.

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required