Tag Archives: delete specific lines

How to delete lines containing a specific string in a text file in linux/unix

Delete lines containing a specific string in a text file, we have three implementation methods: sed -i ‘/ pattern/d’, grep -v ‘pattern’ and awk ‘!/pattern/ {print $0}’ Continue reading

Posted in Text Processing, Awk Command, How to, Sed Command | Tagged , , , | Comments Off on How to delete lines containing a specific string in a text file in linux/unix