Delete Lines with Awk, Grep, and Sed


Grep

grep -v "yobozoboy" myfile.txt > tmpfile && mv tmpfile myfile.txt

Awk

awk '!/yobozoboy/' myfile.txt > tmpfile && mv tmpfile myfile.txt

Gawk

$ gawk -i inplace '!/yobozoboy/' myfile.txt

Sed

sed -i '/yobozoboy/d' myfile.txt