Wednesday, 14 August 2013

use awk to process a csv (tab delimited) line by line

use awk to process a csv (tab delimited) line by line

sorry if this is impossible to do with AWK, but this is something I can
think of with AWK.
I have a CSV file (tab delimited) that has about 10 columns with a big
header section. The content is like this:
col1 col2 col3 col4 col5 col6 col7 col8 col9 col10
I don't need to filter by col1-9, but only need to look at col10 line by
line. The content in each row of col10 is like this
int1/int2: int3,int4: int5: int6
My filtering condition is: if int3 + int4 >= 30, I'll print it out to a
new csv file, otherwise filter it out (no print).
Is this possible to do with AWK in combination with shell scripts (read
line by line?)? thanks a lot for reading my question

No comments:

Post a Comment