coreutils
[Top][All Lists]
Advanced

[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



reply via email to

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