o que é \ 1 e \ 2 em sed? (consulte este post )
$ cat input.txt
hello: '234.34.34.2'
slave_master: '1.2.3.4'
test: '12.123.123.11'
hi: '234.2.32.33'
$ sed "s/\(slave_master:\)\(.*\)/\n -\n - '1.2.3.5'/" input.txt
hello: '234.34.34.2'
slave_master:
- '1.2.3.4'
- '1.2.3.5'
test: '12.123.123.11'
hi: '234.2.32.33'