i would like to know what's the best way to grep lines from text which have more than specific number of special characters.
Let's say that you already know that each line have 4 comma ,
and you would like to grep lines which have more than 4 comma ,
Example
hi,hello,how,are,you
catch,me,then,say,hello,then
Output
catch,me,then,say,hello,then
Best Answer
Perl solution:
-n
reads the file line by lineTo print the lines with less than 4, just change
>
to<
.