Sed
sed text editor
To delete all lines matching a pattern:
$cat file.txt | sed -e "/whatever/d"
Substituting a pattern by another
$echo "pattern to chagne" | sed -e "s/gn/ng/g"
Some wildcards may be used, such as ^ that means the line start, $ that is the line end or that ‘.’ means any character: