sed常見操作

打印: sed -n '/yes/p' test.txt #打印test.txt文件中包含yes的行 大小定轉換: sed 'y/abcdef/ABCDEF/' test.txt 更改: sed '/BOOTPROTO/c BOOTPROTO=dhcp' test.txt 替換: sed '/yes/s//no/g' test.txt 合併文件: sed '$r test.s
相關文章
相關標籤/搜索