🔥码云GVP开源项目 12k star Uniapp+ElementUI 功能强大 支持多语言、二开方便! 广告
``` 在shell脚本中有两种常见的重定向符号 > 和 >> ``` ``` > 表示将符号左侧的内容,以覆盖的方式输入到右侧文件中 [root@ecs-a672-0003 ~]# echo "haha" > file.txt [root@ecs-a672-0003 ~]# cat file.txt haha ``` ``` >> 表示将符号左侧的内容,以追加的方式输入到右侧文件的末尾行中 [root@ecs-a672-0003 ~]# echo "haha" > file.txt [root@ecs-a672-0003 ~]# echo "how are you" >> file.txt [root@ecs-a672-0003 ~]# cat file.txt haha how are you ```