In Unix (running MacOS High Sierra), I've seen a few different search/replace (over several files) methods, e.g.:
perl -pi -w -e 's/SEARCH_FOR/REPLACE_WITH/g;' *.txt
or using sed
or grep
, etc. The problem is, how do I escape my search strings properly? For example, if I need to replace http://my.site/dir
with http://new.my.site/dir
, obviously I can't include forward slashes in my search string without escaping.