linux shell编写以日期时间为文件名的脚本学习笔记

#!/bin/sh
#log
MYDATE=`date +%d%m%y`
#append MYDATE to the variable LOGFILE that holds the actual filename of the log
LOGFILE=/root/test_log.$MYDATE
#create the file
>$LOGFILE
MYTIME=`date +%d%R`
LOGFILE2=/root/test_logtime.$MYTIME
#create the file
>$LOGFILE2
 
 

你可能感兴趣的:(Date,linux,shell,职场,休闲)