Hello,
I have files with fixed length fields.
12345 12345 12345671234567 10 1234567
12345 12345 123456 1234567 10 1234567
I want to take 1st, 3rd, 4th and 6th string.
Usually 3rd and 4th string are coming as it is on the first row /1234567 and 1234567/, then I can use
awk '{print $1,$3,$5}'
and it works. But the problem comes when the 3rd string is shorter, like it is on the second row. It is being shifted with one column.
I was reading and trying with nawk and substr, but I am not so good with Unix.
Could you please help.
Thanks in advance!