Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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.

share|improve this question
    
I doubt it's the digit. Does it work if you rename it "ec3"? –  Dennis Williamson Apr 7 '10 at 23:23

2 Answers 2

-bash: /Users/rob/ec2: No such file or directory

and your script lives here: ~/bin/ec2

Is there a file or directory at /Users/rob/ec2 that's not a script?

share|improve this answer

I would look for an alias, a function or a broken symlink. To check the first two, try:

type -a ec2
share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.