Path: utzoo!attcan!uunet!samsung!zaphod.mps.ohio-state.edu!lavaca.uh.edu!menudo.uh.edu!sugar!peter From: peter@sugar.hackercorp.com (Peter da Silva) Newsgroups: comp.sys.amiga.advocacy Subject: Re: How to improve Workbench 2.0! Message-ID: <1991Feb28.132253.8993@sugar.hackercorp.com> Date: 28 Feb 91 13:22:53 GMT References: <9474@uwm.edu> <8659@gollum.twg.com> <1991Feb23.203358.27835@sat.com> Organization: Sugar Land Unix -- Houston, TX Lines: 27 In article <1991Feb23.203358.27835@sat.com> farren@sat.com (Michael J. Farren) writes: > 2. Does it start with the UNIX standard "#! " comment line? > If so, execute . If anything > goes wrong, abort. What do you do about programs that interpret scripts, but use something other than "#" for a comment leadin? That's the point... AREXX is already an exception to this, and there will undoubtedly be others. Why not define things more generally in the first place: 1. If the script contains "#!text anwhere in the first line, possibly terminated with "!#", then the text and path to this file is prepended to the command line and it is reparsed. So you can handle FrobProc scripts (that use the ADA convention), SuperShell scripts (that follow the Shell comment convention) and so on... -- #!frobproc ; #!supershell /* #!AREXX!# */ ... But look for the same string in the comment field first, so you can use that to call the script without having to load the file. -- Peter da Silva. `-_-' .