常用参数:
参数用途分类参数名参数含义字符串输出bel警铃blink闪烁模式bold粗体civis隐藏光标clear清屏cnorm不隐藏光标cup移动光标到屏幕位置(x,y)el清除到行尾el1清除到行首(注意结尾是数字一不是字母l)smso启动突出模式rmso停止突出模式smul开始下划线模式rmul结束下划线模式sc保存当前光标位置rc恢复光标到最后保存位置sgr0正常屏幕rev逆转视图数字输出cols列数目ittab设置宽度lines屏幕行数布尔输出chts光标不可见hs具有状态行tput setb no设置终端背景色。no的取值:0:黑色、1:蓝色、2:绿色、3:青色、4:红色、5:洋红色、6:黄色、7:白色tput setf no设置文本的颜色。no的取值:0:黑色、1:蓝色、2:绿色、3:青色、4:红色、5:洋红色、6:黄色、7:白色tput ed删除当前光标到行尾的内容可以使用infocmp命令检查终端信息(通过制定名称或者不指定名称的方式)
infocmp $TERM infocmp如:
[root@mesoscloud_test255148 yueling]# infocmp # Reconstructed via infocmp from file: /usr/share/terminfo/x/xterm xterm|xterm terminal emulator (X Window System), am, bce, km, mc5i, mir, msgr, npc, xenl, colors#8, cols#80, it#8, lines#24, pairs#64, acsc=``aaffggiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}}~~, bel=^G, blink=\E[5m, bold=\E[1m, cbt=\E[Z, civis=\E[?25l, clear=\E[H\E[2J, cnorm=\E[?12l\E[?25h, cr=^M, csr=\E[%i%p1%d;%p2%dr, cub=\E[%p1