[Date Prev ][Date Next ][Thread Prev ][Thread Next ][Date Index ][Thread Index ]
Re: [PATCH v2] printenv,env: quote problematic variables
From :
Mike Jonkmans
Subject :
Re: [PATCH v2] printenv,env: quote problematic variables
Date :
Mon, 31 Aug 2026 12:12:08 +0200
On Sun, Aug 30, 2026 at 07:14:43PM -0700, Collin Funk wrote:
> AFAIK,
> sudo only allows you to preserve the entire environment or specific
> variables. I.e., there is no way to set a variable to a given value.
Hi Collin,
Would the --preserve-env option be of any help?
TERM=xterm X1=4 X2=2 NOT=no \
sudo --preserve-env=X1,X2 sh -c 'echo $TERM $X1$X2 $NOT'
--
Regards, Mike Jonkmans
Re: [PATCH] printenv: quote problematic variables on tty , (continued)
Re: [PATCH] printenv: quote problematic variables on tty , PƔdraig Brady , 2026/08/03
[PATCH v2] printenv,env: quote problematic variables , Collin Funk , 2026/08/05
Re: [PATCH v2] printenv,env: quote problematic variables , PƔdraig Brady , 2026/08/05
Re: [PATCH v2] printenv,env: quote problematic variables , Collin Funk , 2026/08/06
Re: [PATCH v2] printenv,env: quote problematic variables , PƔdraig Brady , 2026/08/29
Re: [PATCH v2] printenv,env: quote problematic variables , Collin Funk , 2026/08/29
Re: [PATCH v2] printenv,env: quote problematic variables , PƔdraig Brady , 2026/08/29
Re: [PATCH v2] printenv,env: quote problematic variables , Collin Funk , 2026/08/30
Re: [PATCH v2] printenv,env: quote problematic variables , PƔdraig Brady , 2026/08/31
Re: [PATCH v2] printenv,env: quote problematic variables ,
Mike Jonkmans <=
Re: [PATCH v2] printenv,env: quote problematic variables , Collin Funk , 2026/08/31