path get filename bash code example
Example 1: linux strip foldder name from path
FILE="/home/vivek/lighttpd.tar.gz"
basename "$FILE"
f="$(basename -- $FILE)"
echo "$f"
Example 2: basename bash
basename(1) - strip directory and suffix from filenames