You can use pattern matching of sed to do so !
sed -i '/pattern/d' filenameExample: To remove the lines containing "server" from foo.txt ,do this
sed -i '/server/d' foo.txt
I felt this usefull often . For more SED tutorials , visit http://www.grymoire.com/Unix/Sed.html
No comments:
Post a Comment