When you issue a command to run an application, the system sequentially searches the directories specified in the PATH variable.
For example: If your PATH var contains '/usr/bin:/usr/local/bin:/bin and issue the command to run the test.sh script, the system would look for the test.sh script first in /usr/bin, then /usr/local/bin and finally /bin.
If runs the first instance of the file found. If after searching the directories specified in your PATH var, it does not find a test.sh file it issues the 'command not found' error message.
However, if your specify an absolute path for test.sh, it ignores all of the above and looks directly in the directory specified for the file. So entering:
would cause the system to look directly in /usr/bin for the test.sh file.
To run the test.sh script from the present working directory, use: