shell 无限循环输出时间

 

#!/bin/bash
while(true)
do
    date >> /home/k/a.log
    sleep 1
done

 

查看

tail -f /home/k/a.log

 

posted @ 2019-01-04 12:40  anobscureretreat  阅读(1260)  评论(0编辑  收藏  举报