Linux sed命令

1. 向文件末尾追加内容

# 在CentOS上
sed -i 's/^command.*/& --allow-insecure-unlock/' tmp.txt 

# 在Mac系统上
sed -i '' 's/^command.*$/& --allow-insecure-unlock/' tmp.txt

2. 修改替换文件内容

sed -i 's/\/var\/lib\/iserver/\/data\/.iost/g' iserver.yml 
posted @ 2019-12-06 18:57  zkeeper  阅读(379)  评论(0编辑  收藏  举报