env bug ?

Lennart Sorensen lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org
Wed Mar 9 13:54:15 UTC 2005


On Tue, Mar 08, 2005 at 09:48:09PM +0200, Peter L. Peres wrote:
[snip]
> Would a env replacement that splits its second argument on spaces and 
> then execve's the first of those words with the rest as arguments, be 
> useful ?

It might, but it should also keep an eye out for quotes so you could do:
#!/usr/bin/smartenv dosomething "This is my dumb filename" PATH=/bin:/usr/bin

Of course you still need to deal with the fact the filename gets passed
as the last argument, which still makes this seem like not the place to
use env.  #! is meant for running scripts with the correct interpreter,
and nothing else.

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