bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: env does not wrap variables that contain semicolon in quotes


From: Minghui Liu
Subject: Re: env does not wrap variables that contain semicolon in quotes
Date: Fri, 20 Oct 2017 12:59:34 -0700

> On Oct 20, 2017, at 12:20 PM, Greg Wooledge <address@hidden> wrote:
> 
> On Fri, Oct 20, 2017 at 02:17:10PM -0500, Eric Blake wrote:
>> On 10/20/2017 01:27 PM, Minghui Liu wrote:
>> 
>>>     2. Save env output in a file
>>>             env > env_save
>> 
>> 'env' is not a bash builtin, so your bug report has no effect here.  But
>> even if you were to send your bug report to bug-coreutils (assuming you
>> are using the coreutils version of env), they'd just tell you to use
>> 'env -0', since that is the only delimiter that produces unambiguous
>> results, and that:
>> 
>>>     3. Source the file just saved
>>>             . env_save
>> 
>> this is NEVER safe practice, unless 'env' were patched [...]
> 
> Use these commands instead:
> 
> declare -x > env_save
> source ./env_save

I apologize for posting at the wrong place.
This is very helpful. Thank you.

Minghui



reply via email to

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