GNU bug report logs - #44444
RFE for 'env'?

Previous Next

Package: coreutils;

Reported by: L A Walsh <coreutils <at> tlinx.org>

Date: Wed, 4 Nov 2020 15:28:01 UTC

Severity: normal

Full log


Message #8 received at 44444 <at> debbugs.gnu.org (full text, mbox):

From: Erik Auerswald <auerswal <at> unix-ag.uni-kl.de>
To: L A Walsh <coreutils <at> tlinx.org>
Cc: 44444 <at> debbugs.gnu.org, Bernhard Voelker <mail <at> bernhard-voelker.de>
Subject: Re: bug#44444: RFE for 'env'?
Date: Wed, 4 Nov 2020 17:09:34 +0100
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




This bug report was last modified 4 years and 222 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.