From: Paul Eggert Date: Sun, 4 Mar 2012 17:49:27 +0000 (-0800) Subject: doc: mention PATH bug with "ksh foo" X-Git-Tag: v2.69~16 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5046bf6ee6d1d33373434db07ba18da4ad293f1a;p=thirdparty%2Fautoconf.git doc: mention PATH bug with "ksh foo" * doc/autoconf.texi (Invoking the Shell): Mention ksh PATH bug. --- diff --git a/doc/autoconf.texi b/doc/autoconf.texi index da34a4e8..9442e224 100644 --- a/doc/autoconf.texi +++ b/doc/autoconf.texi @@ -15219,6 +15219,22 @@ Bash in Mac OS X 10.2. @cindex invoking the shell @cindex shell invocation +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 @env{PATH}, and if found it executes +that rather than the original file. For example, assuming there is a +binary executable @file{/usr/bin/script} in your @env{PATH}, the last +command in the following example fails because the Korn shell finds +@file{/usr/bin/script} and refuses to execute it as a shell script: + +@example +$ @kbd{touch xxyzzyz script} +$ @kbd{ksh xxyzzyz} +$ @kbd{ksh ./script} +$ @kbd{ksh script} +ksh: script: cannot execute +@end example + Bash 2.03 has a bug when invoked with the @option{-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