When running scripts in bash, I have to write ./
in the beginning:
$ ./manage.py syncdb
If I don\'t, I get an error message:>
All has great answer on the question, and yes this is only applicable when running it on the current directory not unless you include the absolute path. See my samples below.
Also, the (dot-slash) made sense to me when I've the command on the child folder tmp2 (/tmp/tmp2) and it uses (double dot-slash).
SAMPLE:
[fifiip-172-31-17-12 tmp]$ ./StackO.sh
Hello Stack Overflow
[fifi@ip-172-31-17-12 tmp]$ /tmp/StackO.sh
Hello Stack Overflow
[fifi@ip-172-31-17-12 tmp]$ mkdir tmp2
[fifi@ip-172-31-17-12 tmp]$ cd tmp2/
[fifi@ip-172-31-17-12 tmp2]$ ../StackO.sh
Hello Stack Overflow