linux remove full path from filename code example
Example 1: remove file extension bash
$ filename=foo.txt
$ echo "${filename%.*}"
foo
Example 2: linux strip foldder name from path
FILE="/home/vivek/lighttpd.tar.gz"
basename "$FILE"
f="$(basename -- $FILE)"
echo "$f"