[ILUG] awk help required

From: hrishy (hrishys at domain yahoo.co.uk)
Date: Fri 03 Aug 2001 - 11:07:30 IST


Hello All

I am running redhat 6.2 i have the following question
.i have a text file called st1.txt whose contents are
as follows.

Label Not Found/Identical Yes/No
-----------------------------------------------------
Redhat Label |Not found
Suse Label |Not found
Suse Report |Not found
Berhat Label |Not found

i want to have the count of not found by label.i am
using the follwoing awk script but the count si
displayed as zero.why is that.

BEGIN{
FS="|"
count=0
if ( $1 ~ /Label/ && $2 ~ /Not Found/ )
        {count=count+1}
print count
}
END

output is zero .dont understand why??

regards
hrishy

regards
hrishy

____________________________________________________________
Do You Yahoo!?
Get your free at domain yahoo.co.uk address at http://mail.yahoo.co.uk
or your free at domain yahoo.ie address at http://mail.yahoo.ie



This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:28 GMT