One of the answers given so far is likely to be correct. But you didn't provide us with enough information to be sure (What O/S are you running? What -- if any -- response do you get when you run the script?), so here is how you can diagnose the problem yourself.
1) Enter the command
which Test
If the which
command is not installed, skip ahead. If the answer is
/directory/containing/your/script/Test
then you know you are actually running your script. Other possibilities are
which: no Test in [list of all directories on your path]
This means the Test command is simply not being found. I doubt this is the case, since you say it is in the same directory as other scripts that are working.
/usr/bin/test
This means you are running cygwin under Windows, or some similar system where commands are not case sensitive. As a result, you are running the system test command instead of your Test script. Best bet: rename your script. (You could put your directory in the front of $PATH so that your script is found instead of the system command -- but that's likely to break something else that uses the system test command.)
2) In the absence of the which
command, look at what response you get when you run
Test Joe 22
If there is no response at all, then odds are that you are running the system test command (see above for comments about cygwin, et al.)
If you get "Test: command not found" then either the script really isn't on your path, or you incorrectly entered the shebang (#!) line mentioned elsewhere. Note: having this line is good form, but in many environments it isn't necessary to get your script to run.
If you are still confused, send us
- What operating system you are running under?
- What response do you get when you run the script?
Optionally, but possibly helpful, add
- Your current working directory (
pwd
)
- The directory containing the Test script
- The contents of your PATH variable (
echo $PATH
)