I'm unable to understand what is the use of the following expansion in this code snippet:
image=$1
image_id=${image##*/}
I tried doing echo ${image##*/}
for multiple values of image
but I got the same results every time. Can this piece of code be removed?
$ image='var3-image'
$ echo ${image##*/}
var3-image
$ image=''
$ echo ${image##*/}
$ image='var3-image:asfd'
$ echo ${image##*/}
var3-image:asfd
$ image='var3-image#asfd**'
$ echo ${image##*/}
var3-image#asfd**