Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'a couple shell things' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
a couple shell things
Authored by: Bart VdBroeck on May 14, '01 05:51:20PM

>anyone else know how to do it for other shells?

Sure, someone does. And one of those is even kind enough to let you all know about it. ;-P OK, enough joking around.

You showed it entirely right. Some people create an entirely new list of paths once they learn about the path variable, but expanding the existing one is the way to go.

In csh (or the derived tcsh, the default shell in Mac OS X) you can do it in two ways:

setenv PATH "${PATH}:/Software/BSD/bin"
or
set path = (somepath $path)

In the last entry I've changed the sequence around. This might have advantages and disadvantages. An advantage is that when two commands have the same name, the one in the added directory (e.g. one of your own directories) gets executed instead of the standard one. A disadvantage is that when two commands have the same name, the one in the added directory gets executed instead of the standard one. You see, the new version might have fenomenal new functionalities you desperately need, or it may be a version with an intended flaw or a trojan horse or something. <end of computer filosophical musing>

I don't know how to do it for the Korn shell or others. Anyone? ...

Bart



[ Reply to This | # ]