在shell中

'>' 为创建: echo “hello shell” > out.txt

'>>' 为追加:echo “hello shell” >> out.txt

当out.txt 文本不存在时

'>'与‘>>’都会默认创建out.txt文本,并将hello shell 字符串保存到out.txt中

当out.txt文本存在时

‘>’会将out.txt文本中的内容清空,并将hello shell 字符串存入