Book description
Shell Programming in Unix, Linux and OS X is a thoroughly updated revision of Kochan and Wood’s classic Unix Shell Programming tutorial. Following the methodology of the original text, the book focuses on the POSIX standard shell, and teaches you how to develop programs in this useful programming environment, taking full advantage of the underlying power of Unix and Unix-like operating systems.
After a quick review of Unix utilities, the book’s authors take you step-by-step through the process of building shell scripts, debugging them, and understanding how they work within the shell’s environment. All major features of the shell are covered, and the large number of practical examples make it easy for you to build shell scripts for your particular applications. The book also describes the major features of the Korn and Bash shells.
Learn how to…
Take advantage of the many utilities provided in the Unix system
Write powerful shell scripts
Use the shell’s built-in decision-making and looping constructs
Use the shell’s powerful quoting mechanisms
Make the most of the shell’s built-in history and command editing capabilities
Use regular expressions with Unix commands
Take advantage of the special features of the Korn and Bash shells
Identify the major differences between versions of the shell language
Customize the way your Unix system responds to you
Set up your shell environment
Make use of functions
Debug scripts
Contents at a Glance
1 A Quick Review of the Basics
2 What Is the Shell?
3 Tools of the Trade
4 And Away We Go
5 Can I Quote You on That?
6 Passing Arguments
7 Decisions, Decisions
8 ‘Round and ‘Round She Goes
9 Reading and Printing Data
10 Your Environment
11 More on Parameters
12 Loose Ends
13 Rolo Revisited
14 Interactive and Nonstandard Shell Features
A Shell Summary
B For More Information
Table of contents
- About This E-Book
- Title Page
- Copyright Page
- Developer’s Library
- Contents at a Glance
- Table of Contents
- About the Authors
- We Want to Hear from You!
- Reader Services
- Introduction
-
1. A Quick Review of the Basics
- Some Basic Commands
- Working with Files
-
Working with Directories
- The Home Directory and Pathnames
- Displaying Your Working Directory: The pwd Command
- Changing Directories: The cd Command
- More on the ls Command
- Creating a Directory: The mkdir Command
- Copying a File from One Directory to Another
- Moving Files Between Directories
- Linking Files: The ln Command
- Removing a Directory: The rmdir Command
- Filename Substitution
- Filename Nuances
- Standard Input/Output, and I/O Redirection
- Pipes
- Standard Error
- More on Commands
- Command Summary
- 2. What Is the Shell?
-
3. Tools of the Trade
-
Regular Expressions
- Matching Any Character: The Period (.)
- Matching the Beginning of the Line: The Caret (^)
- Matching the End of the Line: The Dollar Sign $
- Matching a Character Set: The [...] Construct
- Matching Zero or More Characters: The Asterisk (*)
- Matching a Precise Number of Subpatterns: \{...\}
- Saving Matched Characters: \(...\)
- cut
- paste
- sed
- tr
- grep
- sort
- uniq
-
Regular Expressions
- 4. And Away We Go
- 5. Can I Quote You on That?
- 6. Passing Arguments
- 7. Decisions, Decisions
- 8. 'Round and 'Round She Goes
- 9. Reading and Printing Data
- 10. Your Environment
- 11. More on Parameters
- 12. Loose Ends
- 13. Rolo Revisited
- 14. Interactive and Nonstandard Shell Features
-
A. Shell Summary
- Startup
- Commands
- Comments
- Parameters and Variables
- Command Re-entry
- Quoting
- Filename Substitution
- I/O Redirection
- Exported Variables and Subshell Execution
- Functions
- Job Control
-
Command Summary
- The : Command
- The . Command
- The alias Command
- The bg Command
- The break Command
- The case Command
- The cd Command
- The continue Command
- The echo Command
- The eval Command
- The exec Command
- The exit Command
- The export Command
- The false Command
- The fc Command
- The fg Command
- The for Command
- The getopts Command
- The hash Command
- The if Command
- The jobs Command
- The kill Command
- The newgrp Command
- The pwd Command
- The read Command
- The readonly Command
- The return Command
- The set Command
- The shift Command
- The test Command
- The times Command
- The trap Command
- The true Command
- The type Command
- The umask Command
- The unalias Command
- The unset Command
- The until Command
- The wait Command
- The while Command
- B. For More Information
- Index
- Inside Front Cover
- Inside Back Cover
- Code Snippets
Product information
- Title: Shell Programming in Unix, Linux and OS X, Fourth Edition
- Author(s):
- Release date: August 2016
- Publisher(s): Addison-Wesley Professional
- ISBN: 9780134496696
You might also like
book
Learning Unix for OS X, 2nd Edition
Think your Mac is powerful now? Author Dave Taylor shows you how to get much more …
book
Linux Shell Scripting Bootcamp
A quick and straightforward approach to writing shell scripts to accomplish different types of tasks on …
book
Unix Shell Programming, Third Edition
Unix Shell Programming is a tutorial aimed at helping Unix and Linux users get optimal performance …
book
Unix and Linux: Visual Quickstart Guide, Fifth Edition
In this updated edition, authors Deborah and Eric Ray use crystal-clear instructions and friendly prose to …