I'm facing an issue I'm not quite sure how to overcome. I have a large directory with hundreds of folders, all following the naming scheme "a_b_x", with x being a random word. In every one of these folders there are 3 text files, all with a couple of strings containing "a_b_x" as well.
I'm trying to rename all of the directories and change the strings inside the files from "a_b_x" to "a_x", meaning the "b_" is supposed to be removed. I hope to accomplish this with some sed wizardry, as manually editing all of the files would take several hours.
I'd be very thankful for any help!