I have a file with many lines and I would like to replace specific lines that start with a new line but include the old line in it. See below.
for example, if a line starts with (xyz is different for every line)
"#EXT-1,xyz"
I would like to have a line like this
!group=12, "#EXT-1,xyz", name="#EXT-1,xyz"
Is this possible to do with sed
, and if so, how?
I would like to replace specific lines that start with a new line but include the old line in it
So , you mean if line is blank, insert the line before it in place of blank one ? – Sergiy Kolodyazhnyy Sep 03 '16 at 18:42