On 10/1/19 7:14 AM, L A Walsh wrote: > On 2019/09/30 14:39, Grisha Levit wrote: >> A few of the recently-added shopt options aren't getting reset when >> running a shebang-less script, this should fix it up: >> > Suppose the shebang-less script is being run by an earlier version > of bash. Won't the new patch radically change the behavior of of > such programs?
No. > Does posix define the behavior of a child script with no interp-line? "If the execl() function fails due to an error equivalent to the [ENOEXEC] error defined in the System Interfaces volume of POSIX.1-2017, the shell shall execute a command equivalent to having a shell invoked with the pathname resulting from the search as its first operand, with any remaining arguments passed to the new shell, except that the value of "$0" in the new shell may be set to the command name." POSIX doesn't define any executable formats, including #!. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/