You're viewing a comment by MrDuke and its responses.

MrDuke Permalink
September 21, 2011, 10:46

I want to remove lines which having number of commas char greater than N.
counld anyone help me :( ?

Comment Responses

September 21, 2011, 20:25

Here is a trick to do it. Suppose N=5, then this one-liner will delete all lines with 5 commas:

sed -n '/.*,.*,.*,.*,.*,/d

Reply To This Comment

(why do I need your e-mail?)

(Your twitter name, if you have one. (I'm @pkrumins, btw.))

Type first 3 letters of your name: (just to make sure you're a human)

Please preview the comment before submitting to make sure it's OK.