Path: utzoo!utgpu!news-server.csri.toronto.edu!bonnie.concordia.ca!uunet!spool2.mu.edu!samsung!raybed2!rayssd!galaxia!dave From: dave@galaxia.Newport.RI.US (David H. Brierley) Newsgroups: comp.unix.questions Subject: Re: portability of non-shell scripts Keywords: portability Message-ID: <1136@galaxia.Newport.RI.US> Date: 18 Jan 91 02:32:27 GMT References: <1991Jan15.233523.18150@ux1.cso.uiuc.edu> Organization: Dave's Very Own Personal System Lines: 24 In article <1991Jan15.233523.18150@ux1.cso.uiuc.edu> phil@ux1.cso.uiuc.edu (Phil Howard KA9WGN) writes: [ talks about problems when using #! construct ] ... >... Has anyone worked a general way to make >these script programs more portable so that they will run w/o having to >have the user do editing on them? How do you plan on having this work "portably" on systems that don't support the #! mechanism? The only thing I know of that is even close to being portable is to assume that your script will be run by one of the shell interpreters and have the first line of the file exec the program that you really want run. Make sure that you dont have anything on this first line that is sh/ksh/csh specific because I can't gaurantee what shell will be used to run your script. This is one of those problems that has no real solution short of forcing everyone to upgrade to a version of the kernel that supports the #! mechanism (yes, the #! mechanism is implemented *inside the kernel*!!). Since you can make a pretty good guess as to what the odds of this happening are you can apply those same odds to coming up with a solution. -- David H. Brierley Home: dave@galaxia.Newport.RI.US Work: dhb@quahog.ssd.ray.com Can I be excused, my brain is full.