How to remove certain part of files with some conditions, sed or awk? -
Hello I am very new at the AWK or SED.
But here I need it.
I have dozens of files, including
Do I need to find all the files together with this sn Ways to use awk or sed?
Can anyone do the light, thanks in advance.
Using GNU awk for multi-style RS:
$ Cat file is now winter & lt; Li & gt; & Lt; A class = "btn btn-success btn-xs btn-circle" style = "width: 10px; height: 12px;" & Gt; & Lt; / A & gt; Our dissatisfaction online
.
$ cat rmv & lt; Li & gt; & Lt; A class = "btn btn-success btn-xs btn-circle" style = "width: 10px; height: 12px;" & Gt; & Lt; / A & gt; Online
.
$ awk -v RS = '^ $' -v ORS = 'NR == FNR {str = $ 0; Next} s = index ($ 0, str) {$ 0 = substr ($ 0,1, s-1) substr ($ 0, s + length)) 1 'RMV file is now winter of our dissatisfaction < / Code>
Comments
Post a Comment