This command would seem to do what you wish
for file in *.* ; do cp $file ${file//a\./b\.} ; done
Adapted from this answer to Renaming part of a filename
Actually, you could just do
for file in * ; do cp $file ${file//a\./b\.} ; done
Note that the .
has to be escaped using \.
. This is primarily because your example is a filename of a single letter, which could potentially conflict with a letter in the extension.
If your filenames are a bit more explicit, such as doggy.txt
, doggy.pdf
, doggy.xls
, etc., and you want to change them to feline.txt
, feline.pdf
, ..., etc., then you could do away with escaping the .
(and the .
all together), like so:
for file in *.* ; do cp $file ${file//doggy/feline} ; done