I've come across this curious bash expression:
somestring=4.5.6
echo ${somestring%rc*}
For all that I can tell it just prints 4.5.6
. So why would anybody use it?
I found it in this script (look for pkgver
), so I hope I didn't miss any context which is necessary for this to work.