Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!jsq From: rcd@ico.isc.com (Dick Dunn) Newsgroups: comp.std.unix Subject: Re: Shell standardization (for c.std.unix) Summary: not trivial Message-ID: <17403@cs.utexas.edu> Date: 26 Jan 91 22:24:36 GMT References: <17011@cs.utexas.edu> <17065@cs.utexas.edu> <17155@cs.utexas.edu> Sender: jsq@cs.utexas.edu Organization: Interactive Systems Corporation, Boulder, CO Lines: 29 Approved: jsq@cs.utexas.edu (Moderator, John S. Quarterman) X-Submissions: std-unix@uunet.uu.net Submitted-by: rcd@ico.isc.com (Dick Dunn) jack@cwi.nl (Jack Jansen) writes: > ... I don't see any problem in the shell reading the first line and > checking it for #!/bin/sh. > The only thing that this would break is that old shell scripts without > a #! first line wouldn't execute anymore, but this is trivial to fix > by adding the #! line. While I don't really intend to wish evil upon Jansen, I do wish that people who make statements like this would have to keep a hand in maintaining large systems. It is, indeed, trivial to change any given shell script by the addition of a #! line at the beginning. But the task of finding (all instances of) all shell scripts and correcting them all is a most incredible nightmare. Even this ignores finding the programs which generate shell scripts (a much smaller class than the former, but much harder to solve). The alternate solution which has been suggested--having the shell sanity- check before it executes a file--is far more practical to carry out in the real world, and will find virtually all non-shell-script problems. -- Dick Dunn rcd@ico.isc.com -or- ico!rcd Boulder, CO (303)449-2870 ...Mr. Natural says, "Use the right tool for the job." Volume-Number: Volume 22, Number 83