12
votes
1answer
449 views

How do ${0##*/} and ${0%/*} work?

I'm quite confused about the following regular expressions I found in a shell script: ${0##*/} ${0%/*} How do they work?