How to retrieve last folder from a path
I wonder how could we extract the name of the last folder from a path.
The path represent the mount point of a CD/DVD extracted from "df" command.
I have a .sh script with variable $mountpoint set as "/media/user/mycdname" and i would like to retrieve "mycdname".
Is their a split string function somewhere ? or any other way to get it ?
Thanks in advance