Linux 使用echo向文件末尾追加命令

时间:2019-01-19 16:31:05   收藏:0   阅读:944
//echo后边用单引号包围要添加的内容
echo 'add content'>>/home/data/test.sh

注意>>表示在原来的文件末尾上进行追加,如果使用的是>则表示删除原来的内容之后再添加:

echo 'add content'>/home/data/test.sh
评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!