使用cat命令添加或附加多行文本

覆盖原有文本:

cat>test<<EOF

the 1 line

the 2 line

the 3 line

EOF

追加的原有文本尾部:

cat>>test<<EOF

the 4 line

the 5 lien

EOF

通过命令可以看出,区别只是在于">"添加符号,">>"追加符号,这个在linux里面是通用的,在通道的使用上,也是符合相应的规则。

原文地址:https://www.cnblogs.com/litifeng/p/5638513.html