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)
相关文章推荐
- shell中的数学运算
- linux----->shell高级编程----1
- Jenkins使用(五)shell软件的使用
- SSH Secure Shell Client中文乱码的解决方法
- grep常用指令
- SHELL 编程
- 使用shc加密shell脚本
- shell中字符串的简单操作
- Shell脚本调试技术
- 脚本编程--shell
- Linux下高效编写Shell——shell特殊字符汇总
- shell脚本的组合运用
- shell用户配置详解及bash命令参数
- shell .bashrc中函数在其他脚本无法调用问题
- shell脚本练习题
- 巧用adb shell命令,查看所有app的包名
- Shell命令笔记
- bash中字符串和数组的遍历
- linux shell函数
- Bash脚本中date的用法