Need script to change portions of filenames in a directory from user input
Posted on 2012-03-12
We use a program that creates multiple files based on an event number that is manually entered. If the event number is entered incorrectly, we have to change the name on many created files; however, the event number is only a portion of the file name. I only need to change the event number in the file name, is there a way to do that on all files within a specific directory through a script that requests the wrong event number and the correct event number from the user? I have researched sed for this but have not been able to get it to work. I am using Bash to write the script.