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

shell脚本实现动态时钟

2016-06-25 09:39 513 查看
#!/bin/bash

tput civis

while [ 1 ]

do

tput clear

tput cup 3 10

tput setb 0

tput setf 2

echo -e "\e[1;32m$(date "+%Y-%m-%d %H:%M:%S  %A")\e[0m"

sleep 1

done

[/code]在Xshell中运行会有闪屏,不太正常;在本地运行一切正常

来自为知笔记(Wiz)
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: