From: Markus Linden (lindenm at domain rte.ie)
Date: Fri 03 Aug 2001 - 13:18:35 IST
I am hungover today so I might be totaly wrong here but wouldnt "cat
st1.txt |grep 'Not found' |wc -l" work?
Markus Linden
On 03 Aug 2001 11:07:28 +0100, hrishy wrote:
> 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
>
> --
> Irish Linux Users' Group: ilug at domain linux.ie
> http://www.linux.ie/mailman/listinfo/ilug for (un)subscription information.
> List maintainer: listmaster at domain linux.ie
*************************************************************
The information in this e-mail is confidential and may be
legally privileged. It is intended solely for the addressee.
Access to this e-mail by anyone else is unauthorised. If
you are not the intended recipient, any disclosure, copying,
distribution, or any action taken or omitted to be taken in
reliance on it, is prohibited and may be unlawful.
*************************************************************
This archive was generated by hypermail 2.1.6 : Thu 06 Feb 2003 - 13:11:28 GMT