zoukankan      html  css  js  c++  java
  • “echo >”和“echo >>”的区别

    > 输出重定向

    >> 输出追加重定向

    ---------------------------------------------------------------------------------------------------------------------

    echo hello A

    将字符串hello A输出到屏幕

    ---------------------------------------------------------------------------------------------------------------------

    echo hello A > tmp.txt

    将字符串输出重定向,当前目录没有tmp.txt,则创建tmp.txt,并将字符串输出到tmp.txt文件中

    tmp.txt内容:hello A

    ---------------------------------------------------------------------------------------------------------------------

    echo hello B > tmp.txt

    将字符串输出重定向, 当前目录存在tmp.txt,则将tmp.txt内容替换成输出的字符串

    tmp.txt内容:hello B

    ---------------------------------------------------------------------------------------------------------------------

    echo hello C >> tmp.txt

    将字符串输出追加重定向,当前目录存在tmp.txt,则将tmp.txt的内容后面追加输出的字符串

    tmp.txt内容:hello B hello C

    copy from https://www.cnblogs.com/singeryoung/p/9554551.html

  • 相关阅读:
    二叉树(前序,中序,后序遍历)查找
    插入查找
    归并排序
    解密Spring AOP 之AspectJ与动态代理基础知识
    常用的sql
    python 集合方法
    python 字典
    python 列表方法
    python 序列类型
    fake_useragent
  • 原文地址:https://www.cnblogs.com/jetqiu/p/13154145.html
Copyright © 2011-2022 走看看