bash
This demonstrates file extension extraction and manipulation using parameter expansion.
file="Some/path/to/file.txt" echo "Extension: ${file##*.}" echo "Name sans extension: ${file%.*}" echo "New extension: ${file%txt}gif"
bash internaldata manipulationsstring manipulation and expansionsparameter expansionpath manipulation