I have a file of format:
BRAND VERSION MODEL OPTIONS BOUGHT
------ ------- ------- ------- ----------
toyota lxi 2007 4 years ago
nissan mxi 2008 3 years ago
Actually the formatting goes awry when I save-
So its Brand(toyota nissan under it)
VERSION(lxi mxi under it)
MODEL(2007 2008)
OPTIONS -this column is empty
BOUGHT( 4 years ago n 3 years ago)
when I try to pick a row 3 (MODEL) out of it-
cat car.out |perl -ane 'print $F[2]."\n";'
MODEL
-------
2007
2008
This is as expected
Now I try to pick a row 4 (OPTIONS)
cat car.out |perl -ane 'print $F[3]."\n";'
OPTIONS
-------
4
3
The output is incorrect since this column is empty.
Any thoughts on what a workaround could be. I dont want to put in any defualt values like NUL in the OPTIONS Column & also I can;t assume this column is always empty, at times this will have valid entries.
SO need something that would output
OPTIONS
-------
Thanks in advance
David