📌  相关文章
📜  bash 从文件中删除一系列行 - Shell-Bash 代码示例

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

代码示例1
# Basic syntax using sed:
sed 'm,nd' input_file
# Where m is the start line number and n is the end line number inclusive

# Note, add -i to delete the lines in place. E.g.: 
sed -i 'm,nd' input_file # This changes the original input_file