how to exclude everything except a pattern with sed

view full story

http://www.linuxquestions.org – Hi, I have a text file with this content: 9999,name,08,date 9999,name,19,date 9999,name,07,date 9999,name,02,date 9999,name,11,date and i want exclude with sed every line where the code is different than 08 and 07 the desirable output is: 9999,name,08,date 9999,name,07,date how can i do this ? (HowTos)