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

Re: How to add dir to path



Manon Metten wrote:
Hi Mike,

On 8/7/07, Mike McCarty <Mike.McCarty@sbcglobal.net> wrote:

I do believe he's got it... almost.


Errr... She :-)

Sorry 'bout that! Hard to see what you look like! Abject apologies
and all that.

Also, that's a better quote (from "My Fair Lady").

If ENV_VAR is an environment variable, then the shell interprets

$ENV_VAR as a request to remove $ENV_VAR from the command, and replace
it with the value of ENV_VAR. So...

$ ENV_VAR1="Fred Flintstone"
$ ENV_VAR2=$ENV_VAR

sets ENV_VAR2 to be the value of ENV_VAR at the time of the assignment,
or "Fred Flintstone".

$ ENV_VAR2=ENV_VAR

Ooopsies! Should have been ENV_VAR1

sets ENV_VAR2 to be "ENV_VAR1".



This is confusing me. I understand that if ENV_VAR is an environment
variable
than $ENV_VAR represents ENV_VARs value.


But this I don't understand:

$ ENV_VAR1="Fred Flintstone"
$ ENV_VAR2=$ENV_VAR

Should have been $ENV_VAR1


sets ENV_VAR2 to be the value of ENV_VAR at the time of the assignment,
or "Fred Flintstone".

Did you mean

  $ ENV_VAR2=$ENV_VAR1

(notice the 1 at the end)? If so, than it's clear. Or was the value of

Yes, sorry for all the typos. I think I must have gone back and added
the "1" on the end, and messed up.

[snip]

Greetings and many thanks for explaining, Manon.

Very welcome, and sorry 'bout the gender mixup and typos.

Mike
--
p="p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
Oppose globalization and One World Governments like the UN.
This message made from 100% recycled bits.
You have found the bank of Larn.
I can explain it for you, but I can't understand it for you.
I speak only for myself, and I am unanimous in that!



Reply to: