Hi All,
============
ebit;9190000000;Hindi_Astrology_Cancer;Charging_Request;Astrology_Cancer;Karnata
ka;null;null;SUB;null;null;30;0;0;null;;0;genevasoftech_TWSS;null;Subscription Purchase;20090121113221;twss_F7C83CFEE0006F7;xyz;Hindi_Astrology_Cancer;null;SMS
;xyz;null;INR;Null;sms;53535;success;;
=============
i want to count [success] or multiple keyword in the same time.
Page 1 of 1
awk and grap
#2
Posted 23 January 2009 - 02:43 AM
This should do it:
awk 'BEGIN{a=0}{ for (i=0;i < NF;i++) if ( $i ~ /success/ ) a++}END{print a}' YOURFILENAME
Best wishes,
Mike
awk 'BEGIN{a=0}{ for (i=0;i < NF;i++) if ( $i ~ /success/ ) a++}END{print a}' YOURFILENAME
Best wishes,
Mike
The greatest viral marketing idea of all time, get your copy of this Free Report now!
----
Linux Tips, Trick and Advice -- The Linux and Unix Menagerie
----
Linux Tips, Trick and Advice -- The Linux and Unix Menagerie
Page 1 of 1

Sign In
Register
Help



MultiQuote