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

  • 相关阅读:
    #{}和${}的区别
    Shiro 的优点
    SpringSecurity 和 Shiro的之间的比较
    shiro的组件
    Apache Shiro 的三大核心组件
    Maven的工程类型有哪些?
    Maven仓库是什么
    什么是Maven?
    shiro有哪些组件?
    Apache Shiro 的三大核心组件
  • 原文地址:https://www.cnblogs.com/fengliu-/p/10126758.html
Copyright © 2011-2022 走看看