awk Help - Comparison Operator problem

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:

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:

z:\clientfiles>awk -F, 'length($1) == 4 {print length($1)}' 131112_143889b.csv
4

But when I use the Greater than or Equal to operator, I don't understand why I'm not getting back any records?

z:\clientfiles>awk -F, 'length($1) >= 4 {print length($1)}' 131112_143889b.csv

z:\clientfiles>awk -F, 'length($1) >= 0 {print length($1)}' 131112_143889b.csv

z:\clientfiles>

I've tried using the int() and +0 as suggested in other answers in case one of the figures is being treated as a string, but I've hit a wall and not sure what to do next? Can anyone suggest anything? Apologies if I've made a really beginner mistake and can't see it.

Not reproducible on my linux/mawk:

$ awk -F, 'length($1) >= 0 {print length($1)}' file
4
3
2
0

Any invisible chars in your code/data?

thanks for trying RudiC, no there's no invisible characters. Still having same problems so I'm going to check each record individually instead.

pls. post the output of od -An -tx1 131112_143889b.csv , maybe with the file reduced to some few lines.