Conditions in awk

Hi there, here is my command

ssh host.local "/path/to/my/perscript/hostconfig.pl -s $HOST -d |awk '{if (\$4 > 120)print \"My error message\";exit}{s=0; for (i=1; i<=NF; i++) s++; if(s == 13) print \$3}'"

The problem is if conditional 1 is met (i.e $4 > 120), i don't see "My error message", the script just exits.

what is $HOST ?

is that defined in the host.local ?

$HOST is fine, i exported it before ran command

---------- Post updated 02-21-12 at 05:54 AM ---------- Previous update was 02-20-12 at 06:44 AM ----------

up...

awk '$4>120 {print "My error msg"} NF==4 {print $3}'

That should be NF==13 .

Regards,
Alister

@alister: You're right, I was trying it out on a sample file with NF==4 and pasted the same thing here.