I am trying to add the line
text += num.toString(16); after each line, using sed.
My approach is:
Replace every new line with a new line, plus text += num.toString(16);. That is:
sed 's/\ /\ text \+= num\.toString\(16\);/g'
But I couldn't get this working. I am getting
unterminated substitute pattern from sed.
What is wrong here?
I am using BSD sed.