Hey guys,
I'm looking for a script or utility that is capable of some advanced search and replace work based on a list of search/replace values.
To explain what I mean;
- I have a two-column file (csv or txt) containing strings in a format like this:
The 1st column is the string to be found.
The 2nd column is the new string to replace the old with (so "aaaaa" should be replaced by "bbbbb")
- I have a set of files where one contains "aaaaa", another contains "ccccc", another cointans "eeeee", etc.
- I want to be able to find the file that has "aaaaa" and replace it with "bbbbb". Then find the file that contains "ccccc" and replace it with "ddddd"
I could probably code something like this in Perl with some creative use of regexp. but I don't wanna waste my time if there is a tool/script for this job already in existence.
Do you know of any?
Thanks in advance!
I'm looking for a script or utility that is capable of some advanced search and replace work based on a list of search/replace values.
To explain what I mean;
- I have a two-column file (csv or txt) containing strings in a format like this:
Code:
aaaaa, bbbbb
ccccc, ddddd
eeeee, fffff
ggggg, hhhhh
iiiii, jjjjj
kkkkk, lllll
The 2nd column is the new string to replace the old with (so "aaaaa" should be replaced by "bbbbb")
- I have a set of files where one contains "aaaaa", another contains "ccccc", another cointans "eeeee", etc.
- I want to be able to find the file that has "aaaaa" and replace it with "bbbbb". Then find the file that contains "ccccc" and replace it with "ddddd"
I could probably code something like this in Perl with some creative use of regexp. but I don't wanna waste my time if there is a tool/script for this job already in existence.
Do you know of any?
Thanks in advance!
