One-liner to rename files in bash

To rename many files from one pattern to another use e.g.

for i in *.jpeg; do mv $i ${i//exampel/example}; done

Some useful patterns:

${parameter//substring/replacement}
${parameter##remove_matching_prefix}
${parameter%%remove_matching_suffix}
${parameter:offset}
${parameter:offset:length}
${parameter:offset:length}

To check whether the parameter is null:

${parameter:+use this if param is NOT null}
${parameter:-use this if param is null}
${parameter:=use this and assign to param if param is null}
${parameter:?show this error if param is null}