I'm trying to change the names of multiple files recursively within a directory, looking something like this:
parentdirectory/dir1/foo_1.txt /dir2/bar_1.txt /dir3/foo_2.txt
Because a tool that I'm using won't recognize wildcards, I would like to remove the text from each file ending in '1.txt', such that each instance matches exactly.
I can generate a list of those files to STDOUT and pipe it somewhere with:
find . -name '*1.txt' -print0 |
...But I'm not sure how to write the regular expression that (I assume) exists to rename the files. Additionally, rename is not installed with my setup, and I don't have the permissions to add it.