Hour 23. Scripting for Portability

Shell programming is an important part of UNIX because shell scripts are easily portable to many different versions of UNIX. In many cases, shell scripts will function correctly on multiple systems without modification.

The easiest way to ensure that a shell script is completely portable is to restrict the script to using only those commands and features that are available on all versions of UNIX. Sometimes this means that the script must implement workarounds to deal with the limitations of a particular version of UNIX.

In this chapter, we will examine the following topics that relate to shell script portability:

Get Sams Teach Yourself Shell Programming in 24 Hours, Second 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.