shell grammar

2020-02-11
work

> & >>

  1. > 创建
    1
    $ echo "hello shell" > output.txt
  2. >> 追加
    1
    $ echo "hello shell" >> output.txt

    当output.txt不存在时,两者都会创建一个新的output.txt;
    当output.txt存在时,前者会清空并重新写入,后者怎会在末尾追加

ref: https://blog.csdn.net/nahanai/article/details/83861449

--- ###
Share
  • cmd
  • shell
Newer posts
Support ipv6/dualStack in K8s
Olde posts
docker CMD for daily use
  • visitors
  • © 2022 B. Orianna Shi
  • Powered by Hexo
  • Theme Ocean
Solito
  • Home
  • Archives
  • Gallery
  • About
  • Search