I have a text like this:A1JOURNEY0TO1    .BYTE 00, 00, 00A2JOURNEY0TO2    .BYTE 00, 01, 00A3JOURNEY1TO0    .BYTE 00, 01, 01I need to have:JOURNEY_01                               ; 00 TO 01    .BYTE 00, 00, 00JOURNEY_02                               ; 00 TO 02    .BYTE 00, 01, 00JOURNEY_03                               ; 01 TO 00    .BYTE 00, 01, 01and so on, where ; needs to be at char 41 of the line, and values used before and after TO are taken from text strings at start of the line.Someone can help?
Sed/awk/perl: modify text preserving parts and align to a column
text processing;sed;awk;perl