Learning the Korn Shell

Front Cover
"O'Reilly Media, Inc.", 2002 - Computers - 412 pages
2 Reviews

The Korn shell is an interactive command and scripting language for accessing Unix(r) and other computer systems. As a complete and high-level programming language in itself, it's been a favorite since it was developed in the mid 1980s by David G. Korn at AT&T Bell Laboratories. Knowing how to use it is an essential skill for serious Unix users. Learning the Korn Shell shows you how to use the Korn shell as a user interface and as a programming environment.Writing applications is often easier and quicker with Korn than with other high-level languages. Because of this, the Korn shell is the most often used shell in commercial environments and among inexperienced users. There are two other widely used shells, the Bourne shell and the C shell. The Korn shell, or ksh, has the best features of both, plus many new features of its own. ksh can do much to enhance productivity and the quality of a user's work, both in interacting with the system, and in programming. The new version, ksh93, has the functionality of other scripting languages such as awk, icon, Perl, rexx, and tcl.Learning the Korn Shell is the key to gaining control of the Korn shell and becoming adept at using it as an interactive command and scripting language. Prior programming experience is not required in order to understand the chapters on basic shell programming. Readers will learn how to write many applications more easily and quickly than with other high-level languages. In addition, readers will also learn about Unix utilities and the way the Unix operating system works in general. The authors maintain that you shouldn't have to be an internals expert to use and program the shell effectively.The second edition covers all the features of the current version of the Korn shell, including many new features not in earlier versions of ksh93, making it the most up-to-date reference available on the Korn shell. It compares the current version of the Korn shell to several other Bourne-compatible shells, including several Unix emulation environments for MS-DOS and Windows. In addition, it describes how to download and build ksh93 from source code.A solid offering for many years, this newly revised title inherits a long tradition of trust among computer professionals who want to learn or refine an essential skill.

 

What people are saying - Write a review

We haven't found any reviews in the usual places.

Selected pages

Contents

Korn Shell Basics
1
What Is a Shell?
2
History of Unix Shells
3
Getting the 1993 Korn Shell
5
Interactive Shell Use
7
Files
8
Input and Output
18
Background Jobs
22
for
154
case
160
select
164
while and until
167
CommandLine Options and Typed Variables
172
Numeric Variables and Arithmetic
183
Arithmetic for
193
Arrays
194

Special Characters and Quoting
25
CommandLine Editing
33
Enabling CommandLine Editing
34
The History File
35
Emacs Editing Mode
36
Vi Editing Mode
47
The hist Command
60
Finger Habits
63
Customizing Your Environment
65
The profile File
66
Aliases
68
Options
71
Shell Variables
73
Customization and Subprocesses
86
Customization Hints
90
Basic Shell Programming
91
Shell Variables
99
Compound Variables
105
Indirect Variable References namerefs
107
String Operators
108
Command Substitution
127
pushd and popd
131
Flow Control
135
ifelse
136
typeset
200
InputOutput and CommandLine Processing
209
String IO
218
CommandLine Processing
236
Process Handling
257
Process IDs and Job Numbers
258
Job Control
259
Signals
263
trap
270
Coroutines
278
Shell Subprocesses and Subshells
286
Debugging Shell Programs
290
Basic Debugging Aids
291
A Korn Shell Debugger
300
Korn Shell Administration
321
Environment Customization
323
Customizing the Editing Modes
327
System Security Features
329
A Related Shells
337
B Reference Information
366
C Building ksh from Source Code
386
D ATT ast Source Code License Agreement
390
Index
397
Copyright

Other editions - View all

Common terms and phrases

References to this book

All Book Search results »

About the author (2002)

Arnold Robbins, an Atlanta native, is a professional programmer and technical author. He has worked with Unix systems since 1980, when he was introduced to a PDP-11 running a version of Sixth Edition Unix. He has been a heavy AWK user since 1987, when he became involved with gawk, the GNU project's version of AWK. As a member of the POSIX 1003.2 balloting group, he helped shape the POSIX standard for AWK. He is currently the maintainer of gawk and its documentation. He is also coauthor of the sixth edition of O'Reilly's Learning the vi Editor. Since late 1997, he and his family have been living happily in Israel.

Bibliographic information