Welcome to Scribd. Sign in or start your free trial to enjoy unlimited e-books, audiobooks & documents.Find out more
Standard view
Full view
of .
Look up keyword or section
Like this

Table Of Contents

Chapter 1: Introduction
Major Features
Where To Get the Korn Shell
Which Version Do You Have?
Logging In
Changing the Login Shell
Invoking The Korn Shell Separately
Using The Korn Shell in Scripts
Chapter 2: Korn Shell Basics
Simple Script
Process Execution
Multiple Commands
Continuing Commands
Background Jobs
Conditional Execution
Grouping Commands
Table 2.1: Command Execution Format
Input/Output Redirection
Redirecting Standard Output
The noclobber Option
Redirecting Standard Input
File Descriptors
Table 2.2: Some I/O Redirection Operators
Redirecting Standard Error
More with File Descriptors
Table 2.3: File Descriptors
Here Documents
Here Documents and File Descriptors
Discarding Standard Output
Table 2.4: Redirect Operators and File Descriptors
File Name Substitution
The * Character
The ? Character
The [ ] Characters
The ! Character
Table 2.5: Basic Pattern-Matching Characters
Matching . Files
Complex Patterns
Table 2.6: Other File Name Patterns
More Complex Patterns
Disabling File Name Substitution
Command Substitution
Bourne Shell Compatibility
Directing File Input
Arithmetic Operations
Tilde Substitution
Table 2.7: Tilde Substitution
Accessing Variable Values
Table 3.1: Assigning Values to Variables
Variable Attributes
Table 3.2: Assigning Values/Attributes to Variables
Removing Variable Attributes
Multiple Attributes
Checking Variable Attributes
More with Variables
Unsetting Variables
Special Parameters
The ? Parameter
The $ Parameter
Table 3.4: Some Preset Special Parameters
Other Special Parameters
Special Reserved Variables
Variable Expansion
$variable, ${variable}
${variable:–word}, ${variable–word}
${variable:=word}, ${variable=word}
Single Quotes
Double Quotes
Back Quotes
Chapter 4: Editing Commands
Terminal Requirements
Command History File
The fc Command
Displaying the Command History File
Editing the Command History File
In-Line Editor
Vi Edit Mode
Input Mode
Command Mode
Table 4.1: Vi Input Mode Commands
Moving Around the History File
Editing Previous Commands
Table 4.2: Some Vi Command Mode Commands
Displaying Long Command Lines
Emacs/Gmacs Edit Modes
Editing Commands in Emacs/Gmacs Mode
Table 4.3: Some Emacs/Gmacs In-Line Edit Commands
Chapter 5: Job Control
Manipulating Jobs
Checking Job Status
Killing Jobs
Waiting for Jobs
Background Jobs and I/O
Table 5.1: Job Control Commands
Job Names
Leaving Stopped Jobs
Chapter 6: Performing Arithmetic
The let Command
The ((...)) Command
Declaring Integer Variables
Arithmetic Constants
Arithmetic Operators
–expression (Unary Minus)
!expression (Logical Negation)
~expression (Bitwise Negation)
identifier=expression (Assignment)
expression1 <= expression2 (Less than or equal)
expression1 < expression2 (Less than)
expression1 >= expression2 (Greater than or equal)
expression1 > expression2 (Greater than)
expression1 == expression2 (Equal to)
expression1 != expression2 (Not equal to)
expression1 && expression2 (Logical AND)
expression1 || expression2 (Logical OR)
(expression) (Override Precedence)
Random Numbers
Chapter 7: The Environment
After You Log In
New Mail Notification Message
Korn Shell Options
Table 7.1: Some Korn Shell Environment Variables
Enabling/Disabling Options
The ignoreeof Option
The markdirs Option
The nounset Option
Displaying the Current Settings
Table 7.2: Some Korn Shell Options
Command-line Options
Displaying Current Aliases
Table 7.3: Preset Aliases
Tracked Aliases
Removing Aliases
Customizing Your Command Prompt
Restricted Shell
Privileged Mode
Chapter 8: Writing Korn Shell Scripts
Executing Korn Shell Scripts
Positional Parameters
Modifying Positional Parameters
The exit command
The [[...]] Command
Checking Strings
Table 8.2: [[...]] String Operators
Checking Patterns
Table 8.3: Some [[...]] File Operators
Checking File Attributes
Checking Integer Attributes
The ! Operator
Table 8.4: [[...]] Integer Operators
Compound Expressions
&& - The AND Operator
|| - The OR Operator
Table 8.5: Other [[...]] Operators
[[...]] vs test and [...]
Checking File Descriptors
Control Commands
The case Command
Specifying Patterns with case
The for Command
Other for Syntax
The if Command
Other if Syntax: else
Other if Syntax: elif
if/elif vs case
The while Command
The until Command
Nested Loops
Breaking Out of Loops
The continue Command
The select Command
Other select Syntax
The select Menu Format
Input/Output Commands
The print Command
Escape Characters
Table 8.6: print Escape Characters
print Options
The echo Command
The exec Command
The read Command
Reading Input from Files
The IFS Variable
More with read
Reading Input Interactively
The REPLY variable
Miscellaneous Programming Features
The . Command
Returning Function Exit Status
Scope & Availability
Using Functions in Korn Shell Scripts
Function Variables
Displaying Current Functions
Autoloading Functions
Discipline Functions
Removing Function Definitions
Ignoring Signals
Resetting Traps
Exit & Function Traps
Debugging with trap
Trap Signal Precedence
Trapping Keyboard Signals
Debugging Korn Shell Scripts
Enabling Debug Options
The eval Command
The export Command
The false Command
The newgrp Command
The pwd Command
The readonly Command
The set Command
The time Command
The times Command
The true Command
The ulimit Command
Table 9.1: ulimit Options
The umask Command
The whence Command
Directory Functions
Appendix C: C Shell Functionality
Miscellaneous Commands
The chdir Command
The logout Command
The setenv Command
The source Command
Display Files - kcat
Interactive uucp - kuucp
Dirname - kdirname
Display Files with Line Numbers - knl
Find Words - match
Simple Calculator - kcalc
Searching for Patterns in Files - kgrep
Calendar Program - kcal
Appendix E: Korn Shell Man Page
Appendix F: Pdksh
Appendix G: Pdksh Quick Reference
Appendix H: Pdksh Man Page
0 of .
Results for:
No results containing your search query
P. 1


|Views: 51|Likes:
Published by oracle_USA_dba

More info:

Published by: oracle_USA_dba on Jul 27, 2011
Copyright:Attribution Non-commercial


Read on Scribd mobile: iPhone, iPad and Android.
download as PDF, TXT or read online from Scribd
See more
See less





You're Reading a Free Preview
Pages 9 to 86 are not shown in this preview.
You're Reading a Free Preview
Pages 103 to 260 are not shown in this preview.
You're Reading a Free Preview
Pages 274 to 448 are not shown in this preview.

You're Reading a Free Preview

/*********** DO NOT ALTER ANYTHING BELOW THIS LINE ! ************/ var s_code=s.t();if(s_code)document.write(s_code)//-->