Transistorized - an electronics engineer's idyllic spot.

Transistorized
AN ELECTRONICS ENGINEER's IDYLLIC SPOT


HOME - PROJECTS - POSTS - WTEXT! - VIDEOS - FILEAREA - ABOUT

FIND AND REPLACE MULTIPLE STRINGS IN MULTIPLE FILES SHELL SCRIPT

I needed to quickly write some script, which replaces multiple strings in multiple files with other correct ones. I needed this for correcting multiple LaTeX source files for the university VLSI Chip Project report that I was writing. One of my colleagues had extracted a list with the typos made. The problem was that, since the LaTeX project used multiple input files for almost each section, this made it hard to manually find the typos in every individual file and replace them.

The script uses the very famous sed function in shell script, its equivalent in perl is pi. The script reads two columns from a text file one with the typo, another containing the correct words.

You can download the script from here.

An example input file can be found here.

Home Page