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

Reply via email to