Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!wuarchive!rex!ukma!usenet.ins.cwru.edu!ysub!psuvm!cunyvm!ndsuvm1!plains!overby From: overby@plains.NoDak.edu (Glen Overby) Newsgroups: comp.os.minix Subject: Re: executable scripts? Summary: not for the shell to do Message-ID: <10120@plains.NoDak.edu> Date: 2 May 91 18:24:57 GMT References: <1991Apr29.110459.25477@doe.utoronto.ca> Organization: Tea & Ching labs Lines: 19 In article klamer@mi.eltn.utwente.nl (Klamer Schutte) writes: >BSD unix systems recognise the #! as a magic word and execute it with the >proper interpreter. Small unix systems does not. >However, a proper shell >>should<< look at the first two characters of a >script it gets (when the script is executable). Since minix sh does not, I disagree. The shell should not be looking at executables; it should merely "exec" them and the kernel should determine what is REALLY done with the executable, be it loaded as a binary image or fed through an interpreter. By requiring the "shell" to check for executable scripts, you complicate any program which chooses to use exec(2) since it, too, must open the executable and check for an interpreter. Any executable should be "exec"-able. I don't have P1003.1 with me, so I can't check if it addresses this issue. -- Glen Overby uunet!plains!overby (UUCP) overby@plains (Bitnet)