I'm writing a bash script. The output of this bash script is a config file which I create from a template file. I would like to use a sed
command where I can specify ###member###
as a match pattern, and AA
as the replacement. But when I create a new config file with a new replacement BB
, the old string AA
is overwritten. I don't want to overwrite that old string AA
; I just need to add BB
behind AA
.
EXAMPLE:
members ###members###
members aa, bb, cc, ...
I don't know if I can achieve this task with the sed
command.