env bug ?
Lennart Sorensen
lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Tue Mar 8 16:24:26 UTC 2005
On Mon, Mar 07, 2005 at 07:50:16PM -0500, Henry Spencer wrote:
> A very careful reading of the execve(2) manpage (on a somewhat old Red
> Hat) indicates that the contents of the #! line are #!, the full pathname
> of an interpreter, and optionally an argument. Note, "argument", singular
> not plural. So all the remaining text on the line is being taken as *one*
> argument.
>
> This is actually quite a common restriction; supplying more than one
> argument on the #! line has never been very portable.
I guess that is why things like perl have their own way to go back and
reread the first line of the script to pick up any missed arguments.
> I concur.
>
> I wouldn't go that far... quite. I would say that the kernel is handling
> an out-of-spec situation rather ungracefully. It isn't actually wrong but
> really ought to do better.
It works on my kernel, so I suspect the system in question simply
doens't have a real program called echo in the path. Most people
wouldn't notice since bash includes a shell built in for echo.
Lennart Sorensen
--
The Toronto Linux Users Group. Meetings: http://tlug.ss.org
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://tlug.ss.org/subscribe.shtml
More information about the Legacy
mailing list