2 ms·
I use a short bash/perl script to find/replace globally in large files. I have to change the search function each time, although I pass in the file name. Its n
by acomjean 4y ago
I use a short bash/perl script to find/replace globally in large files. I have to change the search function each time, although I pass in the file name. Its not sophisticated, but its been very useful.
The reason I like it is also backs up the original in case I mess up the regex (happens sometimes...)
#!/usr/bin/env bash
perl -i.bak -p -e 's/oldtext/newtext/g;' $1