21.3. Environment

In addition to the problems with portability in shell implementations discussed in the preceding section, the behavior of the shell can also be drastically affected by the contents of certain environment variables and the operating environment provided by the host machine.

It is important to be aware of the behavior of some of the operating systems within which your shell script might run. Although not directly related to the implementation of the shell interpreter, the characteristics of some of target architectures do influence what is considered to be portable. To ensure your script will work on as many shell implementations as possible, you must observe the following points.

SCO Unix doesn't like LANG=C and friends, but ...

Get GNU Autoconf, Automake, and Libtool 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.