Hello, I have a little Vim script which does a multi-line search and replace:
vim -c 's/^ *<hi a=\"26\">\nHello/<td height=\"26\">\r<\/table>\r<bla \/>' \
-c 'w!' -c 'q' test.html
That works. However, when I put that in a find -exec to do this recursively in the directory:
find . -iname 'test.html' -exec \
vim -c 's/^ *<hi a=\"26\">\nHello/<td height=\"26\">\r<\/table>\r<bla \/>' \
-c 'w!' -c 'q' \
{} \;
test.html remains unchanged, and Vim gives me this error:
Pattern not found:
^ *<hi a=\"26\">\nHello
in ./test.html
This is really strange because that is the correct regex, and I can search for it manually in Vim with success.
Can you see any obvious errors with my find syntax?