Tag Archives: Linux learning series notes

Error of replacing VIM editor: s in Linux: pattern not found

In a very simple example, when writing shell scripts, you want to use :s in the Vim editor to implement the substitution function.
I used s/SCORE/1/g
SCORE exists in the script, but the error pattern not found is reported.
Look at this and the result is going to be
s –> %s
g –> ge

%s/SCORE/1/ge
It does, because S will search only on the current row, and %s is needed to replace it throughout the script