摘要: sed -n '1,3p' file表示 取文件 第一行到 第3行的内容; 在匹配行前一行、后一行添加新行 前一行: sed -i '/target string/istring line want to add' $input_file #target string不需要是目标行完整字串,取其一部 阅读全文
posted @ 2022-09-24 11:40 aspirs 阅读(277) 评论(0) 推荐(0) 编辑