I have an odd behavior of $0 under cygwin.
In my script, I do echo "$0"
, and get as output -bash
instead of the pathname. However, if I do realpath $0, i get the actual path. Why is that, and do other people encounter this, too?
I am trying to source the script, does this change things?