Unix Power ToolsUnix Power ToolsSearch this book

Chapter 36. Shell Programming for the Initiated

Contents:

Beyond the Basics
The Story of : # #!
Don't Need a Shell for Your Script? Don't Use One
Making #! Search the PATH
The exec Command
The Unappreciated Bourne Shell ":" Operator
Parameter Substitution
Save Disk Space and Programming: Multiple Names for a Program
Finding the Last Command-Line Argument
How to Unset All Command-Line Parameters
Standard Input to a for Loop
Making a for Loop with Multiple Variables
Using basename and dirname
A while Loop with Several Loop Control Commands
Overview: Open Files and File Descriptors
n>&m: Swap Standard Output and Standard Error
A Shell Can Read a Script from Its Standard Input, but...
Shell Scripts On-the-Fly from Standard Input
Quoted hereis Document Terminators: sh Versus csh
Turn Off echo for "Secret" Answers
Quick Reference: expr
Testing Characters in a String with expr
Grabbing Parts of a String
Nested Command Substitution
Testing Two Strings with One case Statement
Outputting Text to an X Window
Shell Lockfile

36.1. Beyond the Basics

This chapter has a bunch of tricks and techniques for programming with the Bourne shell. Some of them are documented but hard to find; others aren't documented at all. Here is a summary of this chapter's articles:

-- JP



Library Navigation Links

Copyright © 2003 O'Reilly & Associates. All rights reserved.