For Programmers: Free Programming Magazines  


Home > Archive > AWK > November 2007 > Re: print unique ocurrences after matching pattern









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: print unique ocurrences after matching pattern
Atropo

2007-11-13, 7:57 am

On 12 nov, 23:58, Janis Papanagnou <Janis_Papanag...@hotmail.com>
wrote:
> Atropo wrote:
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
> awk '
> match($0,/err[0-9]+/) { e=substr($0,RSTART,RLENGTH) }
> !(e in err) { err[e]; print substr($0,RSTART+3) }
> '
>
> Janis- Ocultar texto de la cita -
>
> - Mostrar texto de la cita -


Excellent Janis, it runs like a charm. thanks to Ed too.


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com