Hi guys. I'm doing some bash scripting and have run into a snag.
Say I have the path:
/home/one/two/three/
All I need is the 'three' while making a filename.
Is there an easy way to do this? I've tried using grep (because I'm that smart.) cut (as I'm unable to tell how many fields there will be in a path, that doesn't work) and than I gave up and started scouring the internet but can't find anyone trying to do the same thing. Any help would be appreciated.