eventually it worked out, it was surely my mistake somewhere. Why running with ./script.sh is bad? I have this shebang in the script: #!/usr/bin/env bash
What's wrong with $0 being set to "-bash"?
No idea, sorry was developing something quickly didn't have time to investigate
Nothing to investigate. It just tells you what mode the shell is in AFAIK.
But what's the difference between -bash and bash?
Run man bash in your terminal and see
You'll probably be interested in login / non-login shells or interactive / non-interactive shells.
Обсуждают сегодня