help on grep

Hi ALL,

I have a text file with many lines containing ------- (1 or more hyphens) and i need to remove them.

i used grep -v "-----" <file1> > <file2> BUT it does not work as hyphen exists. i tried \ (backslash) for escape sequence and double quotes etc. to get no improvement.

Pl help me how can i remove the lines containing >=5 hyphens (e.g., ----- )

Thanks
Prvn

Guess THis should work

sed -e 's/\-//g' filename

Regards,
Anand

Your solution replaces all HYPHENs with NULL

My requirement is to remove the lines containing the string of 5 (or more) consecutive hyphens (e.g., ----- )

Thanks
Prvn

Hope this should work

grep -v "\-" filename

Thanks Aajan,

grep -v "\-----" filename WORKED

grep -v -- - <filename> will also work; the double hypen prevents the next - from being interpreted as an option, but uses it as an arg