M: Quick bash command to select the name and extension of file i

G: You can use this Bash command to extract the name and extension of a file i:

basename -- "$i"

If you want to split them into name and extension separately:

name="${i%.*}"
ext="${i##*.}"
echo "Name: $name, Extension: $ext"

This works as long as the filename contains a dot. If there's no dot, ext will just be the filename itself.