From unknown Tue Jun 17 01:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44444: RFE for 'env'? Resent-From: L A Walsh Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 04 Nov 2020 15:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 44444 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Bernhard Voelker Cc: 44444@debbugs.gnu.org X-Debbugs-Original-Cc: Coreutils Received: via spool by submit@debbugs.gnu.org id=B.160450366612147 (code B ref -1); Wed, 04 Nov 2020 15:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 4 Nov 2020 15:27:46 +0000 Received: from localhost ([127.0.0.1]:50285 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaKhO-00039r-Du for submit@debbugs.gnu.org; Wed, 04 Nov 2020 10:27:46 -0500 Received: from lists.gnu.org ([209.51.188.17]:51340) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaKhN-00039k-AK for submit@debbugs.gnu.org; Wed, 04 Nov 2020 10:27:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:33800) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaKhN-0000if-10 for bug-coreutils@gnu.org; Wed, 04 Nov 2020 10:27:45 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:51726 helo=Ishtar.sc.tlinx.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kaKhI-0000gr-0a for bug-coreutils@gnu.org; Wed, 04 Nov 2020 10:27:44 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 0A4FQdLV066018; Wed, 4 Nov 2020 07:26:42 -0800 Message-ID: <5FA2C855.7080402@tlinx.org> Date: Wed, 04 Nov 2020 07:27:17 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 References: <5FA11F5E.8040606@tlinx.org> <5FA1936E.1040204@tlinx.org> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=173.164.175.65; envelope-from=coreutils@tlinx.org; helo=Ishtar.sc.tlinx.org X-detected-operating-system: by eggs.gnu.org: First seen = 2020/11/04 10:27:37 X-ACL-Warn: Detected OS = Linux 2.2.x-3.x (no timestamps) [generic] [fuzzy] X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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: =E2=80=98perl -T=E2=80=99: No such file or directory So I tried turning off env's arg parsing as we know the linux kernel does handle this. #!/usr/bin/env -- perl -T /usr/bin/env: unrecognized option '-- perl -T' Try '/usr/bin/env --help' for more information. I am not able find a syntax that will generate what I want. 1) '--' isn't handled as being the end of 'env' arguments 2) It isn't splitting white-space to to generate separate arguments but seems to concatenate together as 1 argument.=20 3) This overrides normal linux kernel behavior. This is a kernel policy that is overridden by a user-level program. *>>* If these behaviors were under user control, I don't think it would b= e a problem. While some utils/progs like "find" tend to ignore symlinks unless they are on the command line. Others, like bash, by default, try to give a logical view by following the symlinks and restoring when backing out. Both options can have utility. find even has suboptions fo= r ignoring their use on the cmdline, but expanding them in subtrees.=20 > Bernhard V. Thanks, so it seems 'env' works as expected and=20 > supports the way you need it to run. --- Hopefully you understand you had it backwards -- in that it doesn't work as expected (doesn't break arguments in same places as kernel). and = does not support the way I need it to run. Do to your misunderstanding you closed the original bug -- Hopefully it i= s clear explained enough so this note won't also get deleted. > Have a nice day, > Berny ---- Trying -- at least elections are over. From unknown Tue Jun 17 01:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44444: RFE for 'env'? Resent-From: Erik Auerswald Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Wed, 04 Nov 2020 16:10:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44444 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: L A Walsh Cc: 44444@debbugs.gnu.org, Bernhard Voelker Received: via spool by 44444-submit@debbugs.gnu.org id=B44444.160450617924331 (code B ref 44444); Wed, 04 Nov 2020 16:10:02 +0000 Received: (at 44444) by debbugs.gnu.org; 4 Nov 2020 16:09:39 +0000 Received: from localhost ([127.0.0.1]:50353 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaLLu-0006KN-TL for submit@debbugs.gnu.org; Wed, 04 Nov 2020 11:09:39 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:34207) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaLLt-0006KA-Ew for 44444@debbugs.gnu.org; Wed, 04 Nov 2020 11:09:38 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 0A4G9ZAb143683 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 4 Nov 2020 17:09:35 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 0A4G9Yru004801 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Wed, 4 Nov 2020 17:09:35 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 0A4G9Y06004796; Wed, 4 Nov 2020 17:09:34 +0100 Date: Wed, 4 Nov 2020 17:09:34 +0100 From: Erik Auerswald Message-ID: <20201104160934.GA3976@unix-ag.uni-kl.de> References: <5FA11F5E.8040606@tlinx.org> <5FA1936E.1040204@tlinx.org> <5FA2C855.7080402@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <5FA2C855.7080402@tlinx.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-0.999, tests=ALL_TRUSTED=-1,URIBL_BLOCKED=0.001 X-Spam-Score: (-0.999) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) 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 From unknown Tue Jun 17 01:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44444: RFE for 'env'? Resent-From: L A Walsh Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Thu, 05 Nov 2020 19:43:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44444 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: Erik Auerswald Cc: 44444@debbugs.gnu.org, Bernhard Voelker Received: via spool by 44444-submit@debbugs.gnu.org id=B44444.160460533016735 (code B ref 44444); Thu, 05 Nov 2020 19:43:02 +0000 Received: (at 44444) by debbugs.gnu.org; 5 Nov 2020 19:42:10 +0000 Received: from localhost ([127.0.0.1]:54172 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kal98-0004Lr-5w for submit@debbugs.gnu.org; Thu, 05 Nov 2020 14:42:10 -0500 Received: from ishtar.tlinx.org ([173.164.175.65]:52058 helo=Ishtar.sc.tlinx.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kal96-0004Lh-Cb for 44444@debbugs.gnu.org; Thu, 05 Nov 2020 14:42:09 -0500 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id 0A5Jf3qB066644; Thu, 5 Nov 2020 11:41:07 -0800 Message-ID: <5FA45578.5020006@tlinx.org> Date: Thu, 05 Nov 2020 11:41:44 -0800 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 References: <5FA11F5E.8040606@tlinx.org> <5FA1936E.1040204@tlinx.org> <5FA2C855.7080402@tlinx.org> <20201104160934.GA3976@unix-ag.uni-kl.de> In-Reply-To: <20201104160934.GA3976@unix-ag.uni-kl.de> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Score: 0.0 (/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Ah...so what I asked for has already been added in a newer version. I seem to have > env --version env (GNU coreutils) 8.26.18-5e871 What version of env should I try and test? Thanks! On 2020/11/04 08:09, Erik Auerswald wrote: > 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 From unknown Tue Jun 17 01:48:05 2025 X-Loop: help-debbugs@gnu.org Subject: bug#44444: RFE for 'env'? Resent-From: Erik Auerswald Original-Sender: "Debbugs-submit" Resent-CC: bug-coreutils@gnu.org Resent-Date: Fri, 06 Nov 2020 08:58:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 44444 X-GNU-PR-Package: coreutils X-GNU-PR-Keywords: To: L A Walsh Cc: 44444@debbugs.gnu.org, Bernhard Voelker Received: via spool by 44444-submit@debbugs.gnu.org id=B44444.160465305428193 (code B ref 44444); Fri, 06 Nov 2020 08:58:02 +0000 Received: (at 44444) by debbugs.gnu.org; 6 Nov 2020 08:57:34 +0000 Received: from localhost ([127.0.0.1]:55043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaxYd-0007KQ-3F for submit@debbugs.gnu.org; Fri, 06 Nov 2020 03:57:34 -0500 Received: from mailgw1.uni-kl.de ([131.246.120.220]:48302) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kaxYb-0007KE-7l for 44444@debbugs.gnu.org; Fri, 06 Nov 2020 03:57:17 -0500 Received: from sushi.unix-ag.uni-kl.de (sushi.unix-ag.uni-kl.de [IPv6:2001:638:208:ef34:0:ff:fe00:65]) by mailgw1.uni-kl.de (8.14.4/8.14.4/Debian-8+deb8u2) with ESMTP id 0A68vEsc147867 (version=TLSv1/SSLv3 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Fri, 6 Nov 2020 09:57:14 +0100 Received: from sushi.unix-ag.uni-kl.de (ip6-localhost [IPv6:::1]) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Debian-4+deb7u1) with ESMTP id 0A68vE8E019565 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Fri, 6 Nov 2020 09:57:14 +0100 Received: (from auerswal@localhost) by sushi.unix-ag.uni-kl.de (8.14.4/8.14.4/Submit) id 0A68vDv5019564; Fri, 6 Nov 2020 09:57:13 +0100 Date: Fri, 6 Nov 2020 09:57:13 +0100 From: Erik Auerswald Message-ID: <20201106085713.GB16160@unix-ag.uni-kl.de> References: <5FA11F5E.8040606@tlinx.org> <5FA1936E.1040204@tlinx.org> <5FA2C855.7080402@tlinx.org> <20201104160934.GA3976@unix-ag.uni-kl.de> <5FA45578.5020006@tlinx.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <5FA45578.5020006@tlinx.org> User-Agent: Mutt/1.5.21 (2010-09-15) X-Spam-Status: No, hits=-0.999, tests=ALL_TRUSTED=-1,URIBL_BLOCKED=0.001 X-Spam-Score: (-0.999) X-Spam-Flag: NO X-Spam-Score: -2.3 (--) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) Hi, On Thu, Nov 05, 2020 at 11:41:44AM -0800, L A Walsh wrote: > On 2020/11/04 08:09, Erik Auerswald wrote: > >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. > > Ah...so what I asked for has already been added in a newer version. > > I seem to have > env --version > env (GNU coreutils) 8.26.18-5e871 > > What version of env should I try and test? According to the NEWS file, env from Coreutils 8.30 introduced this option. Thanks, Erik -- Thinking doesn't guarantee that we won't make mistakes. But not thinking guarantees that we will. -- Leslie Lamport