Re: Text file manipulation in CentOS?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Tue, May 11, 2010 at 5:51 AM, hadi motamedi <motamedi24@xxxxxxxxx> wrote:
>
>
>> I don't quite understand this part.
>>
> Thank you very much for your reply.Please find below a segment  of the file:

If you give the following command:

sort YOUR_FILE | uniq -c | sort -n | perl -ne 'print unless /(\d+)/ and $1 < 3'

where YOUR_FILE's contents are exactly the lines you pasted earler you
will get:


      3 CallId 91  State TK         Bts 5  Bt 1  Tr (4 0x0f)  E1 (4 0
18)  Tru (0 1 1)
      4 CallId 92  State TK         Bts 7  Bt 1  Tr (7 0x08)  E1 (3 1
22)  Tru (0 0 0)
      5 CallId 94  State TK         Bts 7  Bt 1  Tr (8 0x0c)  E1 (7 0
15)  Tru (0 0 2)
      7 CallId  9  State TK         Bts 7  Bt 2  Tr (13 0x09)  E1 (4 1
5)  Tru (0 3 0)

The first number is the number of occurrences of each CallId
Does this help?

-- 
Eduardo Grosclaude
Universidad Nacional del Comahue
Neuquen, Argentina
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux