Why do digits in bash script names screw up path lookups?
Posted
by cannikin
on Server Fault
See other posts from Server Fault
or by cannikin
Published on 2010-04-07T22:23:00Z
Indexed on
2010/04/07
22:23 UTC
Read the original article
Hit count: 512
I've got a simple script that lists a bunch of EC2 servers and automates me connecting to them. This script lives at ~/bin/ec2
My PATH looks something like:
/Users/rob/bin:/Users/rob:/usr/local/bin:/usr/local/sbin:/opt/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin
Whenever I call ec2
I get:
-bash: /Users/rob/ec2: No such file or directory
Unless I give it the full path, then it'll work. If I rename the script to just ec
then I can run it from anywhere like expected. Have digits in script names always been a problem like this? I'm on Mac OSX.
© Server Fault or respective owner