Chapter 15. Standard Shell

Table of Contents
Introduction
Standard Shell Exception: pathname of $0
Standard Shell Exception: sourcing non-executable files

Introduction

The process of identifying a single GNU/Linux shell as a standard requires that features intrinsic to the shell be analyzed alongside attributes relating to its usability and availability. Among the many shells existing at the time of the evaluation, two in particular possessed a favorable array of features -- Bash and Pdksh.

After careful research and testing, Bash shell was adopted as the standard for GNU/Linux. At the time of evaluation, Bash was found mostly compliant with the POSIX-1003.2 standard, and its maintainer demonstrated interest in bringing the shell to full compliance. Bash already enjoys wide use among shell users, and is even included in many distributions as the default shell. Further, the abundance of documentation found both on the Internet and in the bookstore makes Bash an easy shell to use.

It should be noted that Bash supports many extensions -- features of a supplemental nature -- to those explicitly specified in POSIX-1003.2. Such extensions to POSIX are not beneficial to the portability of a shell script. The use of extensions must be avoided in order for a shell implementation or shell script to be considered LSB-compliant.

Provisions of the shell command language standard as documented in Section 3 of POSIX-1003.2 are applicable as specified. GNU exceptions to certain standards exist, and in such instances, the GNU method is preferred. Either variation, however, may be used to achieve LSB-compliance. The exceptions follow.