retrive filename from file path 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