jeudi 25 juin 2015

finding lines that contain n occurences of a certain pattern

I have a file containing lines that look like

A,B,1,2,3,$long,6,"A","",$long,,,,"ABC",,$long,,,,
E,F,2,3,4,$long,$long,$long,$long,,,"A","STRING";123456,,,1,2

My goal is to find lines containing n occurences of the pattern "$long".

Anyone knowing the grep regex for this match?

Aucun commentaire:

Enregistrer un commentaire