This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Bash script to go through multiple files looking for certain lines using regex (differing between files) | |
#and replacing it with the correct corresponding text (different for each file), grabbed from a list in an external file | |
#Expects to be placed in the same directory as the files to search through | |
#Relies on 2 external files; a list of filenames to edit, and the corresponding replacement text for each file (separated by newlines) | |
#Used to escape any problematic characters in the replacement text | |
escapeCharacter() #Takes 2 arguments, the character to escape and the text to escape it from |