Documentación offline Bash 5.3

Implementation Differences From The SVR4.2 Shell

5.3 Ver versión oficial en línea Licencia GFDL-1.3Descargado el 2026-08-02

En esta página

Implementation Differences From The SVR4.2 Shell#

Since Bash is a completely new implementation, it does not suffer from many of the limitations of the SVR4.2 shell. For instance:

  • Bash does not fork a subshell when redirecting into or out of a shell control structure such as an if or while statement.

  • Bash does not allow unbalanced quotes. The SVR4.2 shell will silently insert a needed closing quote at EOF under certain circumstances. This can be the cause of some hard-to-find errors.

  • The SVR4.2 shell uses a baroque memory management scheme based on trapping SIGSEGV. If the shell is started from a process with SIGSEGV blocked (e.g., by using the system() C library function call), it misbehaves badly.

  • In a questionable attempt at security, the SVR4.2 shell, when invoked without the -p option, will alter its real and effective UID and GID if they are less than some magic threshold value, commonly 100. This can lead to unexpected results.

  • The SVR4.2 shell does not allow users to trap SIGSEGV, SIGALRM, or SIGCHLD.

  • The SVR4.2 shell does not allow the IFS, MAILCHECK, PATH, PS1, or PS2 variables to be unset.

  • The SVR4.2 shell treats ‘^’ as the undocumented equivalent of ‘|’.

  • Bash allows multiple option arguments when it is invoked (-x -v); the SVR4.2 shell allows only one option argument (-xv). In fact, some versions of the shell dump core if the second argument begins with a ‘-’.

  • The SVR4.2 shell exits a script if any builtin fails; Bash exits a script only if one of the POSIX special builtins fails, and only for certain failures, as enumerated in the POSIX standard.

  • If the lastpipe option is enabled, and job control is not active, Bash runs the last element of a pipeline in the current shell execution environment.