On Mon, Nov 3, 2014, at 05:14 PM, Martti Kühne wrote:
> On Mon, Nov 3, 2014 at 10:30 PM, Brandon Mulcahy <brandon_AT_jangler.info>
> wrote:
> > choice (besides doing something like `export option=a; command; export
> > option=b`). I do wish the concept of aliasing were a bit more general.
>
>
> Did you hear of the shell feature where you could immediately pass
> environment variables by prepending them to your command?
> Like so:
>
> export option=b;
> option=a command;
> echo $option # shows b
And if your shell of choice doesn't happen to support that feature, or
if you just want to do it in a way that will work regardless of the
shell, there is the env command:
env a=1 b=2 c=3 command
--
http://www.fastmail.fm - Accessible with your email software
or over the web
Received on Mon Nov 03 2014 - 23:21:20 CET