danhodges99
IS-IT--Management
Hi,
From a list of directory paths, I need to get only what appears after the last "/" in the path, for example:
From /usr/bin/ftp, I only want "ftp".
From /var/apache/htdocs/project/index.html, I only want "index.html".
Hope this makes sense as it's really been bugging me, I'm guessing there is an awk or sed command that can be used, but I can't find it! Ta.
From a list of directory paths, I need to get only what appears after the last "/" in the path, for example:
From /usr/bin/ftp, I only want "ftp".
From /var/apache/htdocs/project/index.html, I only want "index.html".
Hope this makes sense as it's really been bugging me, I'm guessing there is an awk or sed command that can be used, but I can't find it! Ta.