📜  删除 sed 中的行 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:49:47.308000             🧑  作者: Mango

代码示例3
# -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