From: Janis Papanagnou on
pk wrote:
> Janis Papanagnou wrote:
>
>> awk '0 + $2 >= 50000 {print $1, $2}' hostfile
>
> This is what I thought at first too, but if the file is
>
> host1 52233
> host2 51000failed scan
> host3 2333

Good point. Still open whether that misformat shall match or not; if
there's just a delimiter missing between '51000' and 'failed' it might
be intentional to extract that line, but then (e.g. if you post process
the output) it might be necessary to strip the string part from the two
glued data fileds. As mentioned in another thread, if the example data
leaves room for many possibilities I'd propose solutions and wait for
any necessary clarification.

>
> awk prints the second line too. I guess that's because the standard says
> that string->number conversions should behave as in atof().
>

Janis