coreutils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: env: add -S option (split string for shebang lines in scripts)


From: Bernhard Voelker
Subject: Re: env: add -S option (split string for shebang lines in scripts)
Date: Wed, 2 May 2018 00:48:26 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0

On 05/01/2018 06:40 PM, Eric Blake wrote:
> It makes reasonable sense: the FreeBSD argument is that if you do
> 
> #!/usr/bin/env perl
> 
> you are at the mercy of finding perl on the user's current PATH, but if 
> you do:
> 
> #!/usr/bin/env -S -P /usr/bin:/opt/bin:${PATH} perl
> 
> you can favor /usr/bin/perl or /opt/bin/perl first regardless of whether 
> the user looks there normally, and without corrupting the user's own 
> choice of perl for any child processes within the script.

I see, thanks.

So regarding -S, I'm currently a bit worried about whether a +413 lines
change to the 185 lines env.c source is really warranted ... but I have
to admit that I don't see how -S could be supported in an easier way).

Have a nice day,
Berny



reply via email to

[Prev in Thread] Current Thread [Next in Thread]