I am still new to awk but I have an awk command that does 90% of what I want to do. The line I am splitting looks like this.
Key1^C{"s":"VALUE"}^BKEY2^C{"s":"VALUE"}^BKEY3^C{"s":"VALUE"}
I am splitting it with this awk command
awk -F'\02' '{for(x=1; x<=NF; x++) {nf=split($x,f,"\03"); print f[1], "--", f[2], ","}}' inputfile > outputfile.txt
It comes out looking like this
Key1 -- Value,
Key2 -- Value,
Key3 -- Value,
I was hoping someone could help point me in the direction of how to instead if it is possible to have it look something like this
Key1 -- Value, Key2 -- Value, Key3 -- Value