 |
Learning the bash Shell, 3rd Edition View Larger Image | Cameron Newham O'Reilly Media, Paperback, 3rd edition, Published March 2005, 333 pages, ISBN 0596009658 | List Price: $34.95 Our Price: $21.95 You Save: $13.00 (37% Off)
| | | Availability: In-Stock |
Download an excerpt:
Chapter 4: Basic Shell Programming
Excerpt provided courtesy of O'Reilly and Associates.
|
Customer Reviews: 1 Average Customer Rating:      Write a Review and tell the world about this title! People who purchase this book frequently purchase: - bash Cookbook: Solutions and Examples for bash Users; Cameron Newham, et al, $30.95, 38% Off!
- Classic Shell Scripting; Arnold Robbins, et al, $21.95, 37% Off!
- Linux in a Nutshell, 5th Edition; Ellen Siever, et al, $28.50, 37% Off!
- Sed & Awk, 2nd Edition; Dale Dougherty, et al, $21.95, 37% Off!
Books on similar topics, in best-seller order:Books from the same publisher, in best-seller order:
O'Reilly's bestselling book on Linux's bash shell is at it again. Now that Linux
is an established player both as a server and on the desktop Learning the bash
Shell has been updated and refreshed to account for all the latest changes. Indeed,
this third edition serves as the most valuable guide yet to the bash shell.
As any good programmer knows, the first thing users of the Linux operating
system come face to face with is the shell the UNIX term for a user interface
to the system. In other words, it's what lets you communicate with the computer
via the keyboard and display. Mastering the bash shell might sound fairly simple
but it isn't. In truth, there are many complexities that need careful explanation,
which is just what Learning the bash Shell provides.
If you are new to shell programming, the book provides an excellent introduction,
covering everything from the most basic to the most advanced features. And if
you've been writing shell scripts for years, it offers a great way to find out
what the new shell offers. Learning the bash Shell is also full of practical
examples of shell commands and programs that will make everyday use of Linux
that much easier. With this book, programmers will learn:
- How to install bash as your login shell
- The basics of interactive shell use, including UNIX file and directory
structures, standard I/O, and background jobs
- Command line editing, history substitution, and key bindings
- How to customize your shell environment without programming
- The nuts and bolts of basic shell programming, flow control structures,
command-line options and typed variables
- Process handling, from job control to processes, coroutines and subshells
- Debugging techniques, such as trace and verbose modes
- Techniques for implementing system-wide shell customization and features
related to system security
Table of Contents
Preface
1. bash Basics
What Is a Shell?
Scope of This Book
History of UNIX Shells
Getting bash
Interactive Shell Use
Files
Input and Output
Background Jobs
Special Characters and Quoting
Help
2. Command-Line Editing
Enabling Command-Line Editing
The History List
emacs Editing Mode
vi Editing Mode
The fc Command
History Expansion
readline
Keyboard Habits
3. Customizing Your Environment
The .bash_profile, .bash_logout, and .bashrc Files
Aliases
Options
Shell Variables
Customization and Subprocesses
Customization Hints
4. Basic Shell Programming
Shell Scripts and Functions
Shell Variables
String Operators
Command Substitution
Advanced Examples: pushd and popd
5. Flow Control
if/else
for
case
select
while and until
6. Command-Line Options and Typed Variables
Command-Line Options
Typed Variables
Integer Variables and Arithmetic
Arrays
7. Input/Output and Command-Line Processing
I/O Redirectors
String I/O
Command-Line Processing
8. Process Handling
Process IDs and Job Numbers
Job Control
Signals
trap
Coroutines
Subshells
Process Substitution
9. Debugging Shell Programs
Basic Debugging Aids
A bash Debugger
10. bash Administration
Installing bash as the Standard Shell
Environment Customization
System Security Features
11. Shell Scripting
What's That Do?
Starting Up
Potential Problems
Don't Use bash
12. bash for Your System
Obtaining bash
Unpacking the Archive
What's in the Archive
Who Do I Turn to?
A. Related Shells
The Bourne Shell
The IEEE 1003.2 POSIX Shell Standard
The Korn Shell
pdksh
zsh
Shell Clones and Unix-like Platforms
B. Reference Lists
Invocation
Prompt String Customizations
Built-In Commands and Reserved Words
Built-In Shell Variables
Test Operators
set Options
shopt Options
I/O Redirection
emacs Mode Commands
vi Control Mode Commands
C. Loadable Built-Ins
D. Programmable Completion
Index
About the Author
Cameron Newham lives in Perth, Western Australia. After completing
a Bachelor of Science majoring in information technology and geography at the
University of Western Australia, Cameron joined Universal Defence Systems (later
to become Australian Defence Industries) as a software engineer. He has been
with ADI for six years, working on various aspects of command and control systems.
In his spare time Cameron can be found surfing the Internet, ballroom dancing,
or driving his sports car. He also has more than a passing interest in space
science, 3D graphics, synthesiser music, and Depeche Mode. Bill Rosenblatt is
author of the the O'Reilly Nutshell Handbook(R) Learning the Korn Shell; co-author,
with Deb Cameron, of Learning GNU Emacs; and a contributor to UNIX Power Tools.
He is director of publishing systems at the Times Mirror Company in New York
City and a columnist in SunWorld Online magazine on the World Wide Web. Bill
received a B.S.E. from Princeton University and an M.S. and A.B.D. from the
University of Massachusetts at Amherst, each in some variant of computer science.
His interests in the computing field include multimedia databases, electronic
publishing, and object- oriented systems. Outside of the computing field, he's
interested in jazz, classical music, antique maps, and Sherlock Holmes pastiche
novels. Bill lives on the Upper West Side of Manhattan. He wishes his landlord
allowed pets so that he could truthfully claim to have a dog and cat with suitably
droll names like "Coltrane" and "Ravel."
Customer Reviews
Customer Reviews: 1 Average Customer Rating:      Nov 19, 2007     Russell Quong from Silicon Valley, CA Great for bash version 2 but not for version 3. Sigh I have the 2nd edition for bash v3 and liked it a lot. I bought the 3rd edition for the latest bash v3 features, like regexes, which is the BIG new feature. But there is almost nothing new. For regexes, this book has no section and no examples. For the new v3 brace expansion, it ihas one paragraph with two simple example. Advice: find the hopefully cheaper 2nd edition for v2 or read online information for v3 features.
|
 |