SED
sed 常用选项
Option
Description
sed 执行命令
Command
Description
sed Examples
增
sed -i '2a Hello world!' test.txt
# 在test.txt文件内容第2行后边追加字符串"Hello world!"(追加在了第3行)
sed -i '2i Hello world!' test.txt
# 在test.txt文件内容第2行追加字符串"Hello world!"(追加在了第2行,原先的内容下移)删
改
查
Last updated