date time insert

DATE=`date '+%m/%d/%Y'`
TIME=`date '+%H:%M:%S'`

sed -i '1i1***** start*****' test.ksh
sed -i '2i\ REPORT ID : START' test.ksh
sed -i '3i\ REPORT TITLE : START' test.ksh
sed -i "4i\ REPORT DATE : $DATE" test.ksh
sed -i "5i\ REPORT TIME : $TIME" test.ksh

echo '1***** END OF REPORT *****' >> test.ksh

posted @ 2017-10-09 18:21  kakaisgood  阅读(144)  评论(0编辑  收藏  举报