O'Reilly logo

Practical Linux by Bill Ball, John Ray, Michael Turner, M. Drew Streib

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Writing Shell Programs

Shell programs are similar to batch files in the DOS world. Unlike DOS batch files, however, shell programs have much more advanced functionality; they are akin to conventional programming languages. Entire books have been written about most available shells; this chapter covers only bash because it is the most popular, and because it is used by default on Red Hat, Caldera, and most popular Linux distributions.

Good Programming Practice

Good shell programs are easy to read and understand. This is vital if someone else must modify your work, or if you come back to it months later to fix or extend something. Badly written code is very difficult to work with and understand. Don't kid yourself about being able to remember what ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required