Re: How to add dir to path
Manon Metten wrote:
Hi Mike,
On 8/7/07, Mike McCarty <Mike.McCarty@sbcglobal.net> wrote:
Do something like this
$ export PATH=~/scripts:$PATH
If you put it into the appropriate startup script it will get done
every time.
I was looking for some kind of 'path' command but could not find anything
alike. I didn't know of 'export'.
Well, I combined two commands into one.
$ x=y
sets an environment variable x to value y.
$ export x
makes x available to all subprocesses in the tree which get created
after the export.
$ export x=y
does both at the same time. PATH is an environment variable
like any other in this regard. I don't believe that ksh
can do this, for example. I probably shouldn't have done that.
I just found out that if I add my dir to /etc/profile it's available every
time.
Umm, not where I would have put it. That affects every user.
I'd put it into ~/.bash_profile because I use bash. That way
it would affect only me. If another user doesn't use bash as
his shell, then he'll break.
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: