I was reading a blog post about Docker, when the author used some kind of string manipulation to get only the last directory in a full path.
Specifically:
$ sandbox=/var/run/docker/netns/e4b8ecb7ae7c
$ echo ${sandbox##*/}
e4b8ecb7ae7c
I've tried searching for this ##/ syntax but can't find anything at all. I've also tried playing around with the ##/ to see if I can make it display other stuff, but all I can seem to do is break it.
Can someone point me to more information about this trick so that I can better understand it?
Thanks!
PS - the blog post in question if anyone is interested: http://techblog.d2-si.eu/2017/04/25/deep-dive-into-docker-overlay-networks-part-1.html