The general syntax is:
find . \( -name node_modules -prune \) -o -iname "filenamewildcard*" -type f -exec grep -i -H "wordmatch1\|wordmatch2" {} \;
The output can be quite big, so if you are only interested in seeing the unique filename hits you should pipe the output through the following:cut -d":" -f1 | sort -u
create a script called replace.sh with the following content:
cat $1 | sed 's/stringtosearch/replacement/g' > ../$1
mv ../$1 $1 you can then use find to launch the script:find . -iname "files" -exec ./replace.sh {} \;
SED can behavace unexpectedly for doing the changes in palce with the filename.
set ff=unix
%s/\r//gAs a side note, if you are using Visual Studio, please be sure to use .editorconfig
at the solution root with the following:
endofline = lf