Bash Get Extension from filename fileName=’/path/to/testfile.ext' ext=${fileName/*./} echo “Extension: $ext”