echo 等重定向輸出> 和 >>

> 表示 覆蓋spa

>>表示追加到文件結尾文件

echo hello1 > /tmp/hi.txtco

hi內容:background

hello1

echo hello2 > /tmp/hi.txt

hi內容:

hello2

echo hello3 >> /tmp/hi.txt

hi內容:

hello2

hello3

相關文章
相關標籤/搜索