In school I learned that "$0" would be the name of the script in bash, but when I try to print it, it actually prints -bash instead of the scriptname.
#!/bin/bash
echo "$0"
Output: -bash
Is there something I missed, or is there another command to get the name of the script?