您的位置:首页 > 运维架构 > Shell

bash shell 数字时间钟表

2014-07-02 16:23 106 查看
在某行或者某个位置,打印出“YY/MM/DD HH:MM:SS”

先确定位置
再输出即可
注:有关时间格式到问题 %Y: %B: %d %H:%M:%S

定位以及光标到问题:
tput cup 10 10
tput sc, tput rc, tput civis, tput cnorm
#!/bin/sh

tput civis
while true
do
tput sc
#tput clear
tput cup 17 10
echo -n $(date +%Y)/$(date +%B)/$(date +%d) $(date +%H):$(date +%M):$(date +%S)
sleep 1
tput rc
done


$bash test.sh &
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  shell bash 数字时间