Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Wed, 4 Dec 2002 17:21:16 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Wed, 4 Dec 2002 17:21:16 -0500 Received: from neon-gw-l3.transmeta.com ([63.209.4.196]:6409 "EHLO neon-gw.transmeta.com") by vger.kernel.org with ESMTP id ; Wed, 4 Dec 2002 17:21:15 -0500 To: linux-kernel@vger.kernel.org From: "H. Peter Anvin" Subject: Re: #! incompatible -- binfmt_script.c broken? Date: 4 Dec 2002 14:28:40 -0800 Organization: Transmeta Corporation, Santa Clara CA Message-ID: References: <20021204113419.GA20282@merlin.emma.line.org> <20021204142628.GE26745@riesen-pc.gr05.synopsys.com> <20021204183710.GA4004@merlin.emma.line.org> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Disclaimer: Not speaking for Transmeta in any way, shape, or form. Copyright: Copyright 2002 H. Peter Anvin - All Rights Reserved Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1189 Lines: 31 Followup to: By author: Matthew Garrett In newsgroup: linux.dev.kernel > > The *only* thing you can reliably use in #! lines is an interpreter > followed by a single argument with no trailing space. On NetBSD with > bash as /bin/sh: > > mjg59@cysteine:/tmp$ cat foo.pl > #!/bin/sh -- # -*- perl -*- -p > mjg59@cysteine:/tmp$ ./foo.pl > /bin/sh: -- # -*- perl -*- -p: unrecognized option > > File a bug against perlrun(1). > I personally think that it would be nice to split it by spaces (but yes, ' " and \ need to be handled for this to work.) It allows things like using env to spawn a binary where the location of the interpreter is to be extracted from PATH, for example. -hpa -- at work, in private! "Unix gives you enough rope to shoot yourself in the foot." http://www.zytor.com/~hpa/puzzle.txt - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/