#!/bin/bash# lowerext.sh whilereadf;doif[["$f"=*.*]];then# Extract the basenameb="${f%.*}"# Extract the extensionx="${f##*.}"# Convert the extension to lower case# Note: this only works in recent versions of Bashl="${x,,}"if[["$x"!="$l"]];thenmv"$f""$b.$l"fielsecontinuefidone