I have binary log file with such similar lines which splitted by non-printable char "^A".
I see this symbol backlit white when I open file with command "less"
blah9234^Azzz123^A1=123
blah6344^Azzz123^A1=456
blah4555^Azzz123^A1=78912
I need convert it to:
zzz123^A1=123^Ablah9234
zzz123^A1=456^Ablah6344
zzz123^A1=78912^Ablah4555
so I need take first part
blah9234
add non-printable symbol ^A
^Ablah9234
and put it into the and of line
zzz123^A1=123^Ablah9234
to start I've tried to add ^A to the beginning of the line:
sed 's/^.*blah/^Ablah/' my.log > new.log
but it just adds '^' and 'A' and I got:
^Ablah9234^Azzz123^A1=123
and first ^A doesn't backlit white in less viewer.
Any advice's would be helpful. Thanks.