I have the following data
What i'd like to do is for every line, where there is no ,"555" at the end, I want to remove the the line break, \n, and replace it with space.
So, the 'matching line' would be the line without the "555" at the end. i'd want to replace the line break from those lines.
I am limited in that I can't use Perl for this. So, it has to be AWK, or SED. But preferably AWK as I know SED isn't that good for working on multiple lines.
Here are 2 examples:
Example 1
"abc","555"
"d
e
f","555"
"xyz","555"
"abc
d,e,f ghi
jkl
mnop,qrs","555"
Should become (after amendment)
"abc","555"
" d e f","555"
"xyz","555"
"abc d,e,f ghi jkl mnop,qrs","555"
& Example 2
"abc","555"
"d
e
f","555"
"xyz","555"
"aa
bb
cc
dd","555"
Should become (after amendment)
"abc","555"
"d e f","555"
"xyz","555"
"aa bb cc dd","555"
So in output needed, actually every line has format of
"content","555"