Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!wuarchive!gem.mps.ohio-state.edu!apple!oliveb!amiga!cbmvax!jesup From: jesup@cbmvax.UUCP (Randell Jesup) Newsgroups: comp.sys.amiga.tech Subject: Re: Dealing with multiple scripting languages (was: Elinating the 'rx' from AREXX) Message-ID: <7951@cbmvax.UUCP> Date: 19 Sep 89 18:57:15 GMT References: <721@lpami.wimsey.bc.ca> <1989Aug29.031707.9022@agate.uucp> <7782@cbmvax.UUCP> <4149@sugar.hackercorp.com> Reply-To: jesup@cbmvax.UUCP (Randell Jesup) Organization: Commodore Technology, West Chester, PA Lines: 24 In article shadow@pawl.rpi.edu (Deven T. Corzine) writes: >peter> I would recommend allowing it in more than just the first line, >peter> though, since some scripting languages like having the first >peter> line magic. Also, having some mechanism for passing extra >peter> arguments to the command interpreter would be useful. > >I don't see that this is necessary. It looks to me that the best >solution is very much like Unix with a slight change. First line, >"#!" followed by interpreter location and optional args before script >arg. Stdin of interpreter is set to the script file, starting at the >SECOND line. That way, you don't have to worry about comment syntax. >(Granted, it could be a problem if you try to execute the script >without using the kernal call, then it would start at the first line >and comment syntax would matter.) Most interpreters don't take stdin as input, because (for example) you may not be able to Seek() stdin (pipes). Seeking is useful for loops and the like. Not being able to execute it directly from the interpreter is a big minus, too. -- Randell Jesup, Keeper of AmigaDos, Commodore Engineering. {uunet|rutgers}!cbmvax!jesup, jesup@cbmvax.cbm.commodore.com BIX: rjesup Common phrase heard at Amiga Devcon '89: "It's in there!"