How to mv some files without suffix?

I want to convert a mudlib transcoding from gbk to utf8,. I can convert suffixed files such as * .c and * .h to * .c.bak and * .h.bak save, and then:
find. -type f-name "* .c" | xargs-I {} sh-c "mv {} .bak {}"
can be saved.

the problem is that some text file names do not have a suffix. I need how to write to rename such xxx.bak files to xxx ? I have tried:
find. -type f-not-name "* .c" | xargs-I {} sh-c "mv {}. Bak {}"
because I haven"t come across a file like xxx.bak.bak , so it can still be used. Is there any good way to solve such a problem?

Mar.20,2021

add a condition to find -and-not-name "* .bak" .
find. -type f-not-name "* .c"-and-not-name "* .h"-and-not-name "* .bak" | xargs-I {} sh-c "mv {}. Bak {}" .

Menu