get file extension bash code example
Example 1: extract file extension bash
FILE="/path/to/file.extension"
echo "$FILE" | rev | cut -d '.' -f 1 | rev
Example 2: bash find files with extension
# syntax
find -name '.'
# example
find /export/home/jacquesk -name '*.txt'
# This will search in folder-path (including subdirectories)
# of "/export/home/jacquesk", and will show any files
# that end in '.txt'