The Unix Weekly TIPsheet Vol. Repetitive Unix Jobs One of the challenges that faces the campus as we switch from UA1VM to Bama is the smooth migration of information between machines. Web pages, especially, can prove burdensome because they contain references to the location of data by machine name. In fact, machine names may be imbedded in files hundreds of times.
Hand editing many files, looking for many instances of a change to be made is prone to mistakes.
Thankfully, Unix has tools that make these types of repetitive task very easy to do. You need a script that will get a list of all the important files and go through them to do the replacement. The final step before running the script is to mark it as executable. You can create the script with your favorite editor. Also, beware that this editor doesnt check the context of the word it is changing.