From owner-freebsd-questions@FreeBSD.ORG Wed Jun 14 22:20:29 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 900AA16A4AB for ; Wed, 14 Jun 2006 22:20:29 +0000 (UTC) (envelope-from alfred.morgan@adecn.com) Received: from mail.adecn.com (mail.adecn.com [209.10.222.107]) by mx1.FreeBSD.org (Postfix) with SMTP id 441B643D45 for ; Wed, 14 Jun 2006 22:20:29 +0000 (GMT) (envelope-from alfred.morgan@adecn.com) Received: (qmail 10656 invoked by uid 0); 14 Jun 2006 22:21:30 -0000 Received: from unknown (HELO ?192.168.102.54?) (alfred.morgan@adecn.com@unknown) by unknown with SMTP; 14 Jun 2006 22:21:30 -0000 Message-ID: <44908BA7.6080908@adecn.com> Date: Wed, 14 Jun 2006 15:20:23 -0700 From: Alfred Morgan User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.12) Gecko/20060213 X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-questions@freebsd.org References: <448EE73D.1010606@adecn.com> <44wtbjok1y.fsf@be-well.ilk.org> In-Reply-To: <44wtbjok1y.fsf@be-well.ilk.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Re: shebang line parsing changed in FreeBSD6 X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 Jun 2006 22:20:29 -0000 > http://www.freebsd.org/cgi/query-pr.cgi?pr=16393 I see that this problem is so convoluted that the shebang line has different implementations on the different systems. What about the idea of adding a space after #! to indicate to parse it the way freebsd did. The space following #! will not affect old implementations and will signal the new implementation in FreeBSD6 to split up the arguments. Examples: Note the space after the #!. This next line would work the same in both FreeBSD5 and FreeBSD6: #! /bin/sh -x -e Currently in FreeBSD6 we need to use env -S to get old functionality. This will not work in FreeBSD5 because FreeBSD5's env is missing the -S option: #!/usr/bin/env -S /bin/sh -x -e Space after #! is better than the env -S solution we have now that doesn't work in FreeBSD5 or below. -alfred