i am trying to replace String with new String in Linux vi editor
JavaScript
x
:s/totel_email_count/total_email_count/g
but getting following error.
JavaScript
E486: Pattern not found: totel_email_count
Advertisement
Answer
I’d guess the reason you’re getting that error message is because you intend to replace the string on all lines, not just the current one. In order to search all lines, add a %
to your command:
JavaScript
:%s/totel_email_count/total_email_count/g