Linux/Shell date format: 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
 

你可能感兴趣的:(Shell,Linux,CrossPlatform)