Hi Everyone,
1.txt
Mon 08 Feb 2010 12:30:44 AM MYT;1265560244;e164:0000116047275464;T;Central;0;
Mon 08 Feb 2010 12:30:46 AM MYT;1265560246;e164:0000116047275464;T;Central;0;
Mon 08 Feb 2010 12:30:48 AM MYT;1265560248;e164:0000116047275464;T;Central;0;
Mon 08 Feb 2010 12:30:50 AM MYT;1265560250;e164:0000116047275464;T;Central;0;
Mon 08 Feb 2010 12:30:54 AM MYT;1265560254;e164:0000116047275464;T;Central;0;
Mon 08 Feb 2010 12:36:36 AM MYT;1265560596;e164:0000116062743311;T;Central;0;
Mon 08 Feb 2010 12:40:15 AM MYT;1265560818;e164:0000116047277997;T;Central;2;
Mon 08 Feb 2010 12:41:07 AM MYT;1265560882;e164:0000116047277997;T;Central;14;
Mon 08 Feb 2010 12:44:45 AM MYT;1265561085;e164:0000116096386127;T;Central;0;
Mon 08 Feb 2010 12:47:29 AM MYT;1265561252;e164:0000116069037982;T;Central;3;
Mon 08 Feb 2010 12:47:38 AM MYT;1265561258;e164:0000116069038211;T;Central;0;
i know "wc -l 1.txt" can get the total lines = 11. but if i want to count only the field 6 is greater than 0, means the output should be = 3.
i can think to use for loop. but is any simple way, like awk into one line code?
please advice. thanks
---------- Post updated at 11:20 PM ---------- Previous update was at 11:04 PM ----------
got already
awk -F';' '$6>0' 1.txt | wc -l
