zoukankan      html  css  js  c++  java
  • echo %date%

    基础知识,基础知识太差了。查了半天,先补补课吧。
    “date:~0,10%是DOS里取日期的命令。 

    echo :~1,5%      //指针向右→偏移1位,然后从指针处开始向右→提取5个字符.

    echo :~0,-3%    //指针不偏移,→提取所有字符,并除去最后3个字符.

    echo :~5%        //单个数字,不指定长度值.表示指针→偏移5个字符,然后,→提取所有字符.

    echo :~-5%      //单个负值,特例,表示指针反方向偏移,从最右端起,←偏移5位,然后从指针处开始→提取所有字符.也可以简单理解为提取字符串末尾5个字符。

    C:Documents and Settingsuser>echo %date%
    2012-08-08 星期三
    C:Documents and Settingsuser>echo %date:~5,10%
    08-08 星期三
    C:Documents and Settingsuser>echo %date:~5,4%
    08-0
    C:Documents and Settingsuser>echo %date:~5,5%
    08-08
    C:Documents and Settingsuser>

  • 相关阅读:
    npm包开发与发布
    mapbox展示动态图标
    axios并行请求
    Vue引入ES5的js库
    git常用操作
    单词倒排
    FT232RL芯片USB转TTL应用
    应用GL823芯片自制的读卡器
    队列图示
    队列
  • 原文地址:https://www.cnblogs.com/xianguang/p/8572908.html
Copyright © 2011-2022 走看看