Any way to avoid dot-slash when running executable scripts in bash?
I had same issue and seems no answer till now answers to the question clearly.
The solution to the question is to add export PATH=.:$PATH
to your .bash_profile
. This will include the current directory to the unix search path while it searches for the command. It is also wise to have yourself informed about the security risks of doing so.
add the path of the directory where your script is located to the PATH variable:
export PATH=$PATH:/path/to/directory