Next:
List of Tables
Up:
Programming the UNIX/linux Shell
Previous:
Programming the UNIX/linux Shell
Contents
List of Tables
Programming the Shell
Introduction
Bourne - C shell comparisons
Variables
A Simple Script
Running the Script
Special Characters
'...': Turn off Meaning of Special Characters.
"...": Turn off Meaning of Special Characters EXCEPT $ and `
`...`: Use Output as Content of Variable
Verbatim echo
Parameters and the Shell
$0: The Name of the Invoking Command
$1 $2 $3 ... $9, $*: Shell Parameters
$#: Number of Parameters
shift: Shifts Parameters
read: Reading Input from User
test: Comparisons
Testing/Comparing Numbers
Verifying File Types
Comparing Strings
Combining test: Expressions
Control Structures
for var in list
while condition
until loop
if statement
case: Selections
expr: Doing Arithmetic
Subroutines
Miscellaneous
break
$$: Process ID
$!: PID (Process ID) of the previous background command
$: Return Code
A || B: Either or
A && B: A or Both
set: Change Command-line Parameters
trap: Trap signals
Tips Using Shell Commands
basename: Current Directory
dirname: Directory Path
stty -echo: Passwords
cut, awk: Cut Selected Fields
Exercises
Solutions to Exercises
Programming the Shells
Bibliography
Bibliography
Claude Cantin 2010-10-24