sed remover a linha que contém
sed '/pattern to match/d' ./infile
apagar a linha no sed
sed -e "/your_pattern/d" file
sed -e "/your_pattern/,+2 d" file # 2 lines after the pattern
sed -e '5,5d" # remove 5th line
apagar uma linha que começa com o sed
# Delete all lines starting with '#'
$ sed -i '/^#/d' filepath