Re: .ini files in bash?

From: Cameron Hutchison (camh+dl_at_xdna.net)
Date: 11/30/04

  • Next message: Harland Christofferson: "mdadm raid1"
    Date: Tue, 30 Nov 2004 12:51:08 +1100
    To: debian-user@lists.debian.org
    
    

    Once upon a time Miquel van Smoorenburg said...
    > In article <200411290924.30130.d_baron@012.net.il>,
    > David Baron <d_baron@012.net.il> 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 debian-user-REQUEST@lists.debian.org 
    with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
    

  • Next message: Harland Christofferson: "mdadm raid1"

    Relevant Pages

    • Re: Cannot overwrite an existing symbolic link
      ... I have a cron job creating some logs on a daily basis and would like to have a link on the newest one. ... Okay, I fixed it already with a workaround using a tiny bash script which removes the symbolic link if its existing. ...
      (comp.unix.solaris)
    • Re: .ini files in bash?
      ... > How might one save and restore setting of variables in a bash script to and ... Kamaraju S Kusumanchi ... To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org ...
      (Debian-User)
    • newbie syntax question -> and =>
      ... I am a bit new (okay A LOT NEW) to Perl. ... background is mostly Modula2 and Bash script. ...
      (comp.lang.perl.misc)