manpagez: man pages & more
info autoconf
Home | html | info | man
[ << ] [ < ] [ Up ] [ > ] [ >> ]         [Top] [Contents] [Index] [ ? ]

11.2 Invoking the Shell

The Korn shell (up to at least version M-12/28/93d) has a bug when invoked on a file whose name does not contain a slash. It first searches for the file’s name in PATH, and if found it executes that rather than the original file. For example, assuming there is a binary executable ‘/usr/bin/script’ in your PATH, the last command in the following example fails because the Korn shell finds ‘/usr/bin/script’ and refuses to execute it as a shell script:

$ touch xxyzzyz script
$ ksh xxyzzyz
$ ksh ./script
$ ksh script
ksh: script: cannot execute

Bash 2.03 has a bug when invoked with the ‘-c’ option: if the option-argument ends in backslash-newline, Bash incorrectly reports a syntax error. The problem does not occur if a character follows the backslash:

$ $ bash -c 'echo foo \
> '
bash: -c: line 2: syntax error: unexpected end of file
$ bash -c 'echo foo \
>  '
foo

See section Backslash-Newline Before Empty Lines, for how this can cause problems in makefiles.


This document was generated on April 26, 2012 using texi2html 5.0.

© manpagez.com 2000-2024
Individual documents may contain additional copyright information.