Chapter 16. Shell Programming Overview

In the preceding few hours, you have learned about some of the many options available to you when you use a command shell. Using these shells enables you to enter commands for Unix. What most people don't realize when they first start using Unix is that these shells are also programming environments and that you can write your own shell programs with remarkably little effort. And, oh yeah, it's really fun too.

Goals for This Hour

In this hour, you will learn all about

  • Shellvariables

  • Shell arithmetic

  • Comparison functions

  • Conditional expressions

  • Looping expressions

  • bash functions

Because shells are really just interpreted languages, any sequence of commands you want to run can be placed in a file and run regularly. ...

Get SAMS Teach Yourself Unix in 24 Hours FOURTH EDITION now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.