Is there a way to delete a line containing something and the blank line at the same time?
If you do this it leaves a blank line behind.
sed '/yum/d' .bash_history
I know this works but I would think there would be a way to do it with one command
sed '/yum/d' .bash_history | sed '/^$/d'
In vi this also leaves a blank line behind.
:g/yum/d
In vi this removes the blank line.
:g/^\s*$/d