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
Chapter 1 bash Basics
What Is a Shell?
Scope of This Book
History of UNIX Shells
Interactive Shell Use
Input and Output
Special Characters and Quoting
Chapter 2 Command-Line Editing
Enabling Command-Line Editing
The History List
emacs Editing Mode
vi Editing Mode
The fc Command
Chapter 3 Customizing Your Environment
The .bash_profile, .bash_logout, and .bashrc Files
Customization and Subprocesses
Chapter 4 Basic Shell Programming
Shell Scripts and Functions
Advanced Examples: pushd and popd
Chapter 5 Flow Control
while and until
Chapter 6 Command-Line Options and Typed Variables
Integer Variables and Arithmetic
Chapter 7 Input/Output and Command-Line Processing
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.
Our look is the result of reader comments, our own experimentation, and feedback from distribution channels. Distinctive covers complement our distinctive approach to technical topics, breathing personality and life into potentially dry subjects. The animal on the cover of Learning the bash Shell, Third Edition, is a silver bass, one of the 400-500 species of sea bass. The silver bass, also known as the white perch, is found in freshwater bays and river mouths along the Atlantic coast of North America from Nova Scotia to South Carolina, and is most abundant in the Chesapeake region. Silver bass live in large schools and feed on small fishes and crustaceans. Although many bass never stray far from one place their whole lives, silver bass swim upstream to spawn, often becoming landlocked in the process. Like most bass, the silver bass is attracted to bright, shiny objects, and can be drawn quite close to swimmers and divers in this way. Colleen Gorman was the production editor and copyeditor for Learning the bash Shell, Third Edition. MaryAnne Weeks Mayo, Lydia Onofrei, and Emily Quill provided quality control. Peter Ryan provided production assistance. Angela Howard wrote the index.Edie Freedman designed the cover of this book. The cover image is a 19th-century engraving from the Dover Pictorial Archive. Karen Montgomery produced the cover layout with Adobe InDesign CS using Adobe's ITC Garamond font.
a great task oriented introductory/intermediate guide
Comments about oreilly Learning the bash Shell, 3rd Edition:
This is a valuable introduction book for the bash shell. The best part of this book for me was all the tasks after each subsection. These tasks are designed to encourage you to think about new commands you just learned. The difficulty level was right-on for me, neither too simple or too hard. These helpful practices are rarely seen in other handbooks. Reading and understanding this book, plus completing the recommended tasks, will get you well on your way to productive bash usage and bash programming.
One disappointment was that the book is not a complete reference. The book covers most useful materials you need to know but not all. If you want a complete reference to the bash shell, skip this one.
I highly recommend this book for people in beginning or intermediate level who want to know bash shell.
Comments about oreilly Learning the bash Shell, 3rd Edition:
This book is a good introduction to the bash shell. It is well written and well-edited.
As a serious hobbiest programmer of several languages, I was interested in getting deeper
into the applications of the shell of Linux as an important aspect of learning the overall operating system and gaining the ability to write my own programs both at the GUI level and at the shell or terminal level.
The shell presents a confusing array of arcane syntaxes and symbols that I found difficult
to learn. This book helps sort that out. The shell also throws a group of terminal applications at tasks using the likes of sed, awk, and grep that totally confuse the neophyte. The book only slightly makes a dent in this aspect.
One deficiency is the lack of online sample code that can be downloaded although some typing of your own is always helpful to learning. I went to the 2nd edition site and got what appears to be similar examples.
I actually would like to see more examples and of a greater variety in the book. Some more advanced but still accessible scripts would be useful in the transition from simple code to real applications. Examples more on the line of the debugger code that is given. What do I mean? Well, how about an installation script for software the user might write including installation options and the use or alternative non-use of rpms. Some tips on shaping the environment and configuration for running your programs. How about some internet access via scripts that use wget perhaps in an automated manner for software updates (I know there are applications that do this already). How about extensive file copying and directory creation similar to moving things around with Conqueror or copying from cd's except from the shell. Obviously, this list goes on and on. The author spent an inordinate amount of time with pushd and popd but not one example using tar which is a bread and butter application.