echo追加一个文件里的内容到另外一个文件里面

1.txt

111

2.txt

222

命令

# 覆盖
echo $(cat /test/1.txt) > 2.txt
# 追加
echo $(cat /test/1.txt) >> 2.txt

猜你喜欢

转载自blog.csdn.net/qq_26003101/article/details/113854978