You're viewing a comment by Jakub Hrdina and its responses.

Jakub Hrdina Permalink
October 28, 2011, 12:44

peter, how i can print all lines with WORD in them that appear twice?? please help

Comment Responses

October 29, 2011, 05:34

Really easy, here is how:

sed -n '/WORD.*WORD/p'

The regular expression /WORD.*WORD/ matches two WORDs one after another on the current line. The p command prints such lines, and the -n command line option disables the printing of all other lines.

Reply To This Comment

(why do I need your e-mail?)

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

Type the word "0day": (just to make sure you're a human)

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