Saturday, 15 August 2015

regex - Replacing a string using sed in a lot of .cfg files in the same folder prefixed with MH -


I have many files that I need to change the following strings:

It: <

code> "(@) VBD , CE: O.O.I.G.J. (, I% M # O / A [BG and LT; A "

These files are all named after MH, this is what I tried, but I just have to leave at the prompt:

  sed -i "s /, p6j \\\ ~ aosl \\\} kBFB @ pi \\\; FqBH \ \\ * A @ W. OD / \ "(@) VBD, c:. Ou3iZ (, I% m # o \ / a \ [bg \ & lt; a \ / g \ & lt Any help would be appreciated!   

"Text">

You can do something like this,

  sed 's /, p6j \\ ~ aosl \\} kBFB @ pi \\; FqBH \\\ * A \ @w./ "(@) VBD, SE: OoEiez. (, I% M # O / A [BGTT; A '/ G' file  

In-line editing Edit -i

Example:

  $ echo ', p6j \ ~ aosl \} kBFB @ pi  \; FqBH \ * a. W.Od '| SAD'S /, P6J \\ ~ aosl \\} KBFB @ Pie \\; FQBH \ \\ * A W.O.D./ "(@) VBD, SE: OoIIIG. (, I% M # O / A [BG and LT; A" / G '"(@) VBD, SE: OoIIIZ. (, I% m # O / A [BG   

No comments:

Post a Comment