📅  最后修改于: 2022-03-11 14:49:47.308000             🧑  作者: Mango
# -i here update the file, try with and without -i,
sed -i -e "/your_pattern/d" file
sed -i -e "/your_pattern/,+2 d" file # 2 lines after the pattern
sed -i -e '5,5d" file # remove 5th line