bug-bash
[Top][All Lists]
Advanced

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

Re: output of `export -p' seems misleading


From: Greg Wooledge
Subject: Re: output of `export -p' seems misleading
Date: Fri, 9 Nov 2012 11:21:25 -0500
User-agent: Mutt/1.4.2.3i

On Fri, Nov 09, 2012 at 11:18:24AM -0500, Greg Wooledge wrote:
> restore_environment() {
>   set -o posix
>   eval "$saved_output_of_export_dash_p"
>   set +o posix
> }

Err, what I meant was:

save_environment() {
  set -o posix
  saved_env=$(export -p)
  set +o posix
}

restore_environment() {
  eval "$saved_env"
}



reply via email to

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