mardi 12 septembre 2017

Append a string after a multiple line match in bash

I need to print a line after a multiple line match in bash. For example having this:

admin:
  users:
    - user1
    - user2

..I would need to have this:

admin:
  users:
    - user0
    - user1
    - user2

So i would need to print after

admin:
  users:

How to do this? Should I use sed or awk? How? Thank you

Aucun commentaire:

Enregistrer un commentaire