Hi,

On Wed, Nov 04, 2020 at 07:27:17AM -0800, L A Walsh wrote:
> Rewriting this bug as the other one, apparently, was too unclear
> to be understood.
> 
> This gives an example, two in fact.
> 
> 
> On 2020/11/03 14:48, Bernhard Voelker wrote:
> >On 11/3/20 6:29 PM, L A Walsh wrote:
> >>    I tried to use 'env' to find perl in my path and wanted to pass
> >>the -T option to perl.
> >>
> >>cat >/tmp/taint+print
> #!/usr/bin/env perl -T
> printf "Hello World\n";
> 
> I am unable to get this to run and print out:
> 
> "Hello World" \
> 
> Instead of expected output, I get:
> /usr/bin/env: ‘perl -T’: No such file or directory

That is not env, that is the Linux kernel providing 'perl -T' as single 
argument to env.

    $ cat taint+print
    #!/usr/bin/env perl -T
    printf "Hello World\n";
    $ ./taint+print
    /usr/bin/env: ‘perl -T’: No such file or directory
    $ /usr/bin/env perl -T taint+print
    Hello World
    $ 

Please see
https://www.gnu.org/software/coreutils/manual/html_node/env-invocation.html#g_t_002dS_002f_002d_002dsplit_002dstring-usage-in-scripts
for an explanation.

HTH,
Erik
-- 
Ow, you made me look at perl code.
                        -- Andrew Morton



Reply via email to