As in shell to rename the file with the replacement?

How batch rename files, namely .jpeg(jpg).optimized on .jpeg(jpg) if such a name is, replace
June 10th 19 at 15:41
1 answer
June 10th 19 at 15:43
rename-f 's/\.jpeg\(jpg\)\.optimized$/.jpeg(jpg)/' *.jpeg\(jpg\).optimized

Find more questions by tags LinuxCommand line