From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <411d773bda22cda6fe293b34eb13376c@proxima.alt.za> To: 9fans@9fans.net Date: Thu, 9 Apr 2009 20:56:52 +0200 From: lucio@proxima.alt.za In-Reply-To: <6af7d252267a104b4669cb592cf72bf2@hamnavoe.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: Re: [9fans] #! scripts Topicbox-Message-UUID: d7b02804-ead4-11e9-9d60-3106f5b1d025 > See exec(2): > For a file beginning #!, the arguments passed to the program > (/bin/rc in the example above) will be the name of the file > being executed, any arguments on the #! line, the name of > the file again, and finally the second and subsequent argu- > ments given to the original exec call. The result honors > the two conventions of a program accepting as argument a > file to be interpreted and argv[0] naming the file being > executed. I always seem to expect a subtly different behaviour from what I get. In this case, I note now that NetBSD behaves exactly the same, but I only considered trying it out after you've made me read that passage for the sixteenth time. I guess I always read in it what I was hoping to find. I guess that means I have nothing to fix. Not only, but any extensions I was hoping for are shown to be utterly impractical :-( Let me go back to ELF... ++L