[wplug] Re: wplug vars in Bash
Mike Sussman
sussmanm at math.pitt.edu
Sat Jan 20 12:48:37 EST 2007
Zach asked the question about the difference between
EDITOR=/usr/bin/emacs:"${EDITOR}"
and
export EDITOR=/usr/bin/emacs
and Mike Semcheski responded that one was for "this shell only" and the
second for setting the environmental variable.
There is a second difference: The first form puts "/usr/bin/emacs"
in front of whatever was there before and the second form discards
whatever the previous contents of EDITOR might have been.
>
> Message: 13
> Date: Fri, 19 Jan 2007 20:07:23 -0500
> From: Zach <netrek at gmail.com>
> Subject: [wplug] vars in bash?
> To: "General user list" <wplug at wplug.org>
> Message-ID:
> <ecfa260c0701191707i66d2ff9fkef9d6eb47a3e847f at mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1; format=flowed
>
> I am looking for the canonical way to declare an environment variable
> in the BASH shell. Which of these two forms is preferable:
>
> EDITOR=/usr/bin/emacs:"${EDITOR}"
>
> or
>
> export EDITOR=/usr/bin/emacs
>
> I have this in my .bashrc.
>
> Zach
>
>
> ------------------------------
--
Mike Sussman
sussmanm at math.pitt.edu
More information about the wplug
mailing list