1

awk Help - Comparison Operator problem

view story
linux-howto

http://www.unix.com – Hi, I've tried searching through the forum but I've drawn a blank so i'm going to post here. I'm developing a number of checks on a CSV file, trying to find if any are greater than a max limit. I'm testing it by running it from a command line. The file I'm testing has 8 records. When I perform a print of the length of the field I want to check I get this: Code: z:\clientfiles>awk -F, '{print length($1)}' 131112_143889b.csv 4 3 3 3 3 3 3 0 When I use the Equal operator as a check, I return the results I expect: Code: z:\clientfiles>awk -F, 'length($1) == 4 {pr (HowTos)