当前位置:   article > 正文

Linux/Shell date format: date +“%Y%m%d_%H_%M_%S“_date=$(date "+%y%m%d%h%m%s")

date=$(date "+%y%m%d%h%m%s")


root@localhost:~$ date +"%Y_%m_%d_%H_%M"
2019_07_24_00_15
root@localhost:~$ date +"%Y_%m_%d_%H_%M_%S"
2019_07_24_00_15_48
root@localhost:~$ date +"%Y%m%d_%H_%M_%S"
20190724_00_16_01
lake@localhost:~$

#/bin/bash

LOG_FAIL_LIST=$TMP/log_fail_list`date +"%Y_%m_%d_%H_%M"`.txt


while [ "1" = "1" ]

do

 echo "`date +"%Y_%m_%d_%H_%M"` Ascii from PC Host to RS485/UART    "  > /dev/ttymxc3  
 echo "`date +"%Y_%m_%d_%H_%M"` Ascii from PC Host to RS485 BUS2  "  > /dev/ttymxc4

done
 

 

#### Set 

# date  -s   2020.02.02-12:22:11
Sun Feb  2 12:22:11 UTC 2020
 #
 

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/496898
推荐阅读
  

闽ICP备14008679号