[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: env does not wrap variables that contain semicolon in quotes
From: |
Greg Wooledge |
Subject: |
Re: env does not wrap variables that contain semicolon in quotes |
Date: |
Fri, 20 Oct 2017 15:20:32 -0400 |
User-agent: |
NeoMutt/20170113 (1.7.2) |
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