Batch rename tool: mmv

brew install mmv

It’s easier to use than rename.

For example:

mmv 'a*.txt' 'a_#1.txt'

#1 is the captured group of the first *. You could have mulptile * and capture them with #1, #2, etc.