zl程序教程

您现在的位置是:首页 >  其他

当前栏目

shell tput的用法

shell 用法
2023-09-14 09:08:38 时间
tput sc ##记录光标位置
tput cup x y ###移动光标至x列y行
tput rc ##返回光标位置
tput civis ##隐藏光标
tput cnorm ## 显示光标
tput setaf ColorNumber## 设置前景色
tput setab ColorNumber ##设置背景色
#加粗
bold=$(tput bold)

#下划线
underline=$(tput sgr 0 1)

#重置规则
reset=$(tput sgr0)

#红色
red=$(tput setaf 1)

#绿色
green=$(tput setaf 2)