sed (stream editor) is the archetype Unix wonder. I have a fond memory of learning the tool in my teenage.
sed -f rules.txt target.dat
where rules.txt contains the set or rules, e.g., to change times in subtitles:
s/--> 00:00:02,763/--> 00:00:02,680/ s/--> 00:00:03,705/--> 00:00:03,621/ s/--> 00:00:04,580/--> 00:00:04,506/