delete some line

Hi All,

I have a file it contains 1600 lines. it is like

aaa,bbb,ccc,ddd,eee
xxx,bbb,fff,hhh,uuu
vvv,mmm,kkk,ppp
....

I want to delete lines which contains "bbb". (there are to many lines for "bbb")

how can I do this ??

Thanks

Alice.

alisev,

This is already been answered. Search the forum.

sed '/bbb/d' your_file_name > new_file_name

You can use grep as well.

There is an option "-v" that prints all except for what follows the -v option.

cat filename |grep -v bbb > filename.out

If you wanted to get rid of blank lines as well add " |grep -v ^$ " into the command line.

cat filename |grep -v bbb |grep -v ^$ > filename.out

ENJOY!!!

Unix is so versatile. UNIX RULESSSS!!!!