Sed --- sed text editor ''''''''''''''' To delete all lines matching a pattern: .. code-block:: shell $cat file.txt | sed -e "/whatever/d" Substituting a pattern by another .. code-block:: shell $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: