mardi 30 août 2016

Add a line leading space after first pattern and just above next pattern using SED/AWK

Input:

define { abcd pattern xyzs wedlenle jqwd sadjkjnd

}

define { abcd asjdanja xyzs wedlenle jqwd sadjkjnd

}

define { adkja pattern xyzs wedlenle jqwd sadjkjnd

}

expected output:

define { abcd pattern xyzs wedlenle jqwd sadjkjnd addtext

}

define { abcd asjdanja xyzs wedlenle jqwd sadjkjnd

}

define { adkja pattern xyzs wedlenle addtext

}

Need to add line(leading space) in same define block just before "}".

Appreciate your help!

Aucun commentaire:

Enregistrer un commentaire