As you can see on line 5, fields 3 & 4 are running into each other. This is due to the fields being fixed width and the value being to large (I'm assuming). I do not actually know the field widths, but could probably figure it out (by counting) if needed.
What I need is to ensure that fields 3 & 4 stay separated so I can perform some calculations with them (ie. $3 * $4). Filed 3 should always be a single digit. So "if length field 3 > 1 then split field 3 into fields 3 & 4 after the first digit in field 3".
Wouldn't that cause the lines without the issue to be double spaced?
Could I use something like this:
awk '{if (length($3) > 1)<more code>;}' file.txt
---------- Post updated at 01:53 PM ---------- Previous update was at 01:51 PM ----------
I'd agree with you normally, but they are a real pain, and turn around time would be lengthy. The actual end purpose would still work out, (dose not need to be exact) the first few place values would suffice.
It will move lines without issues as well, but this way the alignment of the columns will be saved. If you inserted the space only on faulty line, then all the columns after that insertion will be out of line compared to the unchanged lines. Check that output (I've shortened your sample input lines a bit):