8

how to parse this data and count the matching patterns? [closed]

view full story
linux-howto

http://unix.stackexchange.com – Gi1/0/12 Gi1/0/13 Gi1/0/14 Gi1/0/15 Gi1/0/16 Gi1/0/17 Gi1/0/18 Gi1/0/19 Gi1/0/20 Gi1/0/21 Gi1/0/22 Gi1/0/23 Fa2/0/13 Fa2/0/14 Fa2/0/15 Fa2/0/16 Fa2/0/17 Fa2/0/18 Fa2/0/19 Fa2/0/20 Fa2/0/21 Fa2/0/22 Fa2/0/23 Fa2/0/24 Gi2/0/1 I want to parse this data so that I can have the no of regexvalue start end count Gi1/0/ 12 23 12 Fa2/0/ 13 13 12 Gi2/0/ 1 1 1 NOTE:regex value could be changing like instead of Gi it could be te or instead of Gi/0/ it could be Gi/1 or Gi/10.but the format reamains same. this is how i just did it (HowTos)