Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!zaphod.mps.ohio-state.edu!uakari.primate.wisc.edu!aplcen!jhunix!barrett From: barrett@jhunix.HCF.JHU.EDU (Dan Barrett) Newsgroups: comp.sys.amiga.advocacy Subject: Re: Script bits Message-ID: <7564@jhunix.HCF.JHU.EDU> Date: 13 Feb 91 19:34:00 GMT References: <18ac1a05.ARN2ae4@prolix.pub.uu.oz.au> Organization: The Johns Hopkins University - HCF Lines: 33 In article <18ac1a05.ARN2ae4@prolix.pub.uu.oz.au> dac@prolix.pub.uu.oz.au writes: >Having eight bits is kinda useful, Peter. The 'Script' bit is great. Whilst >having the machine check to see if a file is a script, is plain dumb. There is >no reason why a binary should start with any particular sequence of >characters, right? Are you aware that all Amiga executable files start with the same bytes? That's how the Amiga can tell it is indeed a program, and not just data. >Therefore, there is no reason why some unlucky binary file could start with >the text '.key', and then the script interpreter would be >called instead of the program loader - which would try to 'execute' a binary. >Not clever at all. UNIX does this. The interpreter just fails on the file, as if it had a syntax error. Not a problem, really. Of course, the file would have to have its execute bit (incorrectly) turned on in the first place. A person might just as easily set the script bit on a non-script file as set the execute bit on a non-executable. But you are right -- the method isn't perfect. But neither is having a different bit for each of 52 different interpreters (Shell, AREXX, AmigaBasic, csh, sksh, etc etc), or the inability to run scripts for "unsupported" interpreters. Dan //////////////////////////////////////\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\ | Dan Barrett, Department of Computer Science Johns Hopkins University | | INTERNET: barrett@cs.jhu.edu | | | COMPUSERVE: >internet:barrett@cs.jhu.edu | UUCP: barrett@jhunix.UUCP | \\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\/////////////////////////////////////