#!/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
在Xshell中运行会有闪屏,不太正常;在本地运行一切正常
转载于:https://blog.51cto.com/hiyang/1792777
#!/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
转载于:https://blog.51cto.com/hiyang/1792777