delete lines with sed
i have to check the first 30 lines of a file with sed and to delete those lines which contain a specific word or phrase.
sed -i '/specword/d' filename
this deletes all the lines in a file, but i want to check only the first 30.
how should i do this?
thanks a lot !