Once upon a time Miquel van Smoorenburg said...
> In article <[EMAIL PROTECTED]>,
> David Baron  <[EMAIL PROTECTED]> wrote:
> >How might one save and restore setting of variables in a bash script to and 
> >from a file in one's home (or sub-) directory?
> 
> Okay so everybody's trying to outdo eachother trying to write
> sed scripts that do proper quoting. 

No, that's just me outdoing myself (or really just finding cases that my
last attempt failed on).

> To save variables:
> 
>       export -p > envfile
> 
> To read them back:
> 
>       . envfile

An equivalent suggestion has already been raised and rejected. The
original poster did not want to save all variables, just certain ones.
Plus, this method will not allow you to save non-exported shell
variables.


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED] 
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]

Reply via email to