Let's say I have a script called bob. It might be in two locations: /usr/local/bin/bob or /usr/local/bin/scripts/bob. Is there a way I can alias bob to both locations and it will stop whenever it finds bob? So if bob is in /usr/local/bin/bob, it will stop there, otherwise it will look in /usr/local/bin/scripts/bob?
| |||
|
feedback
|
|
This is what your PATH environment variable is for. Arrange your PATH environment variable so that both locations are on the path, AND in the order you want them to to be checked. So in your example, Most systems will probably have
Other shells will vary. | |||||
feedback
|