Path: utzoo!attcan!uunet!bfmny0!tneff From: tneff@bfmny0.UU.NET (Tom Neff) Newsgroups: comp.sources.d Subject: Re: Perl scripts on systems without "#!" Message-ID: <14942@bfmny0.UU.NET> Date: 21 Nov 89 05:41:44 GMT References: <255C7F44.171@ateng.com> <5935@cbnewsh.ATT.COM> <2568811E.264@ateng.com> Reply-To: tneff@bfmny0.UU.NET (Tom Neff) Lines: 18 Summary: Expires: Sender: Followup-To: In article <2568811E.264@ateng.com> chip@ateng.com (Chip Salzenberg) writes: >After discussion, it seems that a script can be identified in only one >portable way: A script with ":" as the first character is always run by >the Bourne shell. Anything else is non-portable. Am I right? Not really... Korn shell (with the default "SHELL=/bin/ksh" set) will execute a script with ":" as the first character under Korn rather than Bourne. Of course, if you're sure it's one of Korn OR Bourne, the $RANDOM trick will pick 'em. The bottom line is there's no portable standard. BSD mavens get so used to their #! hack they assume it's universal, but it ain't. I suspect there's an elegant hack though, I just haven't thought of it. -- "Take off your engineering hat | "The filter has | Tom Neff and put on your management hat." | discreting sources." | tneff@bfmny0.UU.NET