Get Extension Of File In Bash Link to heading

# Method 1. Bash substitution
ext=$(echo "$file#*.")

# Method 2. hack
ext=$(echo "$file" | rev | cut -d "." -f 1 | rev)