Hi, I've got a very large ASCII file (1.5 GB), which doesn't have line terminators, making it impossible to read it right, i need to format it like:
add line terminators.
delete some lines on the file.
delete some fields on all the remainings lines (can be identified by a string).
After getting the file under the correct format i will inject it into a mysql DB, file details:
ASCII text, with very long lines, with no line terminators, i already tried tr and sed , but i cannot get it right.
hexdump head:
0000000 3136 3937 3934 3134 2032 2020 2020 4120
0000010 5249 2020 4d54 2053 4120 5249 2020 3137
0000020 3131 3131 2030 2020 2020 2020 2020 2020
0000030 2020 2020 2020 2020 2020 2020 2020 2020
*
0000070 2020 2020 2020 2020 2020 2020 3032 3730
0000080 3231 3732 3031 3131 3934 3032 3730 3231
0000090 3732 3330 3030 3030 3130 3038 3130 2020
00000a0 3236 3137 3630 3638 2030 2020 2020 4120
00000b0 5249 2020 4d54 2053 4120 5249 2020 3137
00000c0 3131 3131 2030 2020 2020 2020 2020 2020
00000d0 2020 2020 2020 2020 2020 2020 2020 2020
*
0000110 2020 2020 2020 2020 2020 2020 3032 3730
0000120 3231 3732 3031 3131 3934 3032 3730 3231
0000130 3732 3231 3030 3030 3130 3038 3130 2020
0000140 3236 3537 3332 3737 2036 2020 2020 4120
0000150 5249 2020 4d54 2053 4120 5249 2020 3137
0000160 3131 3131 2030 2020 2020 2020 2020 2020
0000170 2020 2020 2020 2020 2020 2020 2020 2020
*
--
Best regards.