From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20618 invoked from network); 25 Nov 2006 19:31:56 -0000 X-Spam-Checker-Version: SpamAssassin 3.1.7 (2006-10-05) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.5 required=5.0 tests=AWL,BAYES_00, FORGED_RCVD_HELO autolearn=ham version=3.1.7 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by ns1.primenet.com.au with SMTP; 25 Nov 2006 19:31:56 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 67968 invoked from network); 25 Nov 2006 19:31:44 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 25 Nov 2006 19:31:44 -0000 Received: (qmail 27100 invoked by alias); 25 Nov 2006 19:31:37 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 23012 Received: (qmail 27086 invoked from network); 25 Nov 2006 19:31:36 -0000 Received: from news.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.88) by sunsite.dk with SMTP; 25 Nov 2006 19:31:36 -0000 Received: (qmail 67220 invoked from network); 25 Nov 2006 19:31:36 -0000 Received: from vms046pub.verizon.net (206.46.252.46) by a.mx.sunsite.dk with SMTP; 25 Nov 2006 19:31:33 -0000 Received: from torch.brasslantern.com ([71.116.86.88]) by vms046.mailsrvcs.net (Sun Java System Messaging Server 6.2-6.01 (built Apr 3 2006)) with ESMTPA id <0J9A00254WW5WLSI@vms046.mailsrvcs.net> for zsh-workers@sunsite.dk; Sat, 25 Nov 2006 13:31:18 -0600 (CST) Received: from torch.brasslantern.com (localhost.localdomain [127.0.0.1]) by torch.brasslantern.com (8.13.1/8.13.1) with ESMTP id kAPJVGTE016378 for ; Sat, 25 Nov 2006 11:31:17 -0800 Received: (from schaefer@localhost) by torch.brasslantern.com (8.13.1/8.13.1/Submit) id kAPJVGmd016377 for zsh-workers@sunsite.dk; Sat, 25 Nov 2006 11:31:16 -0800 Date: Sat, 25 Nov 2006 11:31:16 -0800 From: Bart Schaefer Subject: Re: shebang problem In-reply-to: =?iso-8859-1?Q?=3C48AA2667-A59C-4B22-AC23-4CCF62857FE6=40free?= =?iso-8859-1?Q?=2Efr=3E?= =?iso-8859-1?Q?Comments=3A_In_reply_to_Une_B=E9vue_=3Cyt=2Edev=40free=2Ef?= =?iso-8859-1?Q?r=3E?= =?iso-8859-1?Q?________=22shebang_problem=22_=28Nov_25=2C__3=3A06pm=29?= To: zsh-workers@sunsite.dk Message-id: <061125113116.ZM16374@torch.brasslantern.com> MIME-version: 1.0 X-Mailer: OpenZMail Classic (0.9.2 24April2005) Content-type: text/plain; charset=iso-8859-1 Content-transfer-encoding: quoted-printable References: <48AA2667-A59C-4B22-AC23-4CCF62857FE6@free.fr> On Nov 25, 3:06pm, Une B=E9vue wrote: } } #!/usr/bin/env ruby }=20 } $ ./my_script.rb }=20 } zsh complains of syntax error because it attempt to read to ruby=20=20 } file, which, obviously, doesn't have the same syntax as the shell. I think you must be misinterpreting something about what's happening. E.g., I made a little script that feeds itself to "cat": schaefer[509] ./dog -n 1 #!/usr/bin/env cat 2 Woof woof That seems to be working properly. What output do you get from this: file -L ${^path}/ruby(N) My suspicion is that perhaps there's another file named "ruby" somewhere in your path that is not the executable you think it is. } someone running over a linux box (i don't know it's shell) said it's=20= =20 } a known prob at least sicnce jul 2003. Not that I've ever heard of before. A known problem with ruby, perhaps? =20 } that's the reason for this shebang that way i was believing the shell=20= =20 } would address the right ruby... The shell isn't "addressing" ruby at all when you have that #! line ... rather, /usr/bin/env is (or should be) invoked, and then env locates ruby and executes it. This may appear to be a silly question, but: Are you certain that the "#" character is the very first character in the file?