I have a directory with a couple thousand images in it. Most of them have sensible filenames like SD-000.tif SD-001.tif BX-000.tif etc...
However probably ~25% of them have names like BX-003_old.tif BX-004_veryold.tif
How can I rename the problem files by removing the _word from the end of the each?
The files are stored on a FreeBSD server however the directory is shared out via samba.
I tried using combinations of sed and awk but I'm not having any luck getting them to only work with the middle of the files.
Does anyone have any ideas?