How can I append characters to a files name in linux, using a regex? I've seen these two posts
- How to rename multiple files by replacing word in file name?
but haven't been able to get the answers to work for me. I'm also not sure if this belongs here, stack overflow or in another sub-site.
I've been trying
for FILE in \d+_\d+\.png; do echo "$FILE" $(echo "$FILE" | sed 's/\./_t\./'); done
but that doesn't seem to recognize the regexed filename as a regex.
So for data samples my files currently are
and I want them to be
The files are scattered amongst five directories. Thanks.