Don't name your script test
. This is a built-in command in most shells, so they don't go looking for an external program.
Also, to run a program in your current directory, you should type ./programname
. It's generally a bad idea to have .
in your $PATH
, which would be necessary to execute it without the directory prefix.