对shell中cat 和EOF的理解

下载我们在linux文本界面下测试下

$cat hao.c

$wo mei you chi fan

$cat > hao.c << EOF

>where are you

>EOF

再次cat hao.c 出现

where are you

可以看出被覆盖了

但是如果输入如下命令:

$cat >> hao.c << EOF

输出的结果是:

wo mei you chi fan

where are you

原文地址:https://www.cnblogs.com/haoxing990/p/4633204.html