"Schwarz, Konrad" <konrad.schw...@siemens.com> wrote: > > However, I would argue that non-directory files that have the > > executable bit set but that cannot be loaded by exec*() are mis- > > configured -- perhaps this needs to be stated somewhere. > > Upon further reflection, the above is wrong: the POSIX shell > will attempt to run any file that cannot be loaded by exec*() > as a script in a sub-shell. The result of the sub-shell > is taken as the new $?.
This is what happened in the 1970s at a time when a different CPU architecture was highly improbable. Modern shells tend to open the file and to check whether it contains an excutable header for a wrong architecture. Jörg -- EMail:jo...@schily.net (home) Jörg Schilling D-13353 Berlin joerg.schill...@fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.org/private/ http://sf.net/projects/schilytools/files/'