当前位置: 首页 > news >正文

sql数据库做的网站怎么发布百度搜索资源平台token

sql数据库做的网站怎么发布,百度搜索资源平台token,做付费下载的网站,新北网站建设1.tput介绍 linux命令tput是可以在终端中进行文本和颜色的控制和格式化,其是一个非常有用的命令 2.tput用法 命令: man tput 3.样例 3.1.清除屏幕 命令: tput clear [rootelasticsearch ~]# tput clear [rootelasticsearch ~]# 3.2.…

1.tput介绍

linux命令tput是可以在终端中进行文本和颜色的控制和格式化,其是一个非常有用的命令

2.tput用法

命令:

man tput

3.样例

3.1.清除屏幕

命令:

tput clear

[root@elasticsearch ~]# tput clear
[root@elasticsearch ~]# 

3.2.设置文本样式

加粗:

命令:

tput bold

[root@elasticsearch ~]# tput bold       #加粗
[root@elasticsearch ~]# echo "This is bold style."
This is bold style.
[root@elasticsearch ~]# tput sgr0       #恢复默认样式
[root@elasticsearch ~]# 

3.3.获取终端的行数和列数

命令:

lines=$(tput lines)

columns=$(tput cols)

echo "Terminal has $lines lines and $columns columns."

[root@elasticsearch ~]# lines=$(tput lines)
[root@elasticsearch ~]# columns=$(tput cols)
[root@elasticsearch ~]# echo "Terminal has $lines lines and $columns columns."
Terminal has 10 lines and 113 columns.
[root@elasticsearch ~]# 

3.4.移动光标的位置

命令:

tput cup 2 20

#将光标移动到第2行20列

[root@elasticsearch ~]# tput cup 2 20[root@elasticsearch ~]# 

3.5.隐藏光标

命令:

tput civis

[root@elasticsearch ~]# tput civis
[root@elasticsearch ~]# 
[root@elasticsearch ~]# 

3.6.显示光标

命令:

tput cnorm

[root@elasticsearch ~]# tput cnorm
[root@elasticsearch ~]# 
[root@elasticsearch ~]# 

3.7.设置文本颜色

tput命令可以用来设置文本的前景和背景颜色

3.7.1.将文本字体颜色设置为绿色

命令:

tput setaf 2

echo "This is green text."

tput sgr0

[root@elasticsearch ~]# tput setaf 2
[root@elasticsearch ~]# echo "This is green text."
This is green text.
[root@elasticsearch ~]# tput sgr0
[root@elasticsearch ~]# 

3.7.2.将文本背景颜色设置为红色

命令:

tput setab 1

echo "This text has a red background."

tput sgr0

[root@elasticsearch ~]# tput setab 1
[root@elasticsearch ~]# echo "This text has a red background."
This text has a red background.
[root@elasticsearch ~]# tput sgr0
[root@elasticsearch ~]# 

通常情况下,文本字体颜色及文本背景颜色分配的数值与颜色的对应关系如下(可能会因 UNIX 系统的不同而异):

数值颜色
0黑色
1红色
2绿色
3黄色
4蓝色
5紫色
6深绿色
7灰色

3.7.3.文本综合案例

设置文本字体颜色为蓝色,文本背景颜色为灰色

脚本:

#!/bin/bashblue_font=$(tput setaf 4)
grey_background=$(tput setab 7)
reset_normal=$(tput sgr0)#
echo "${blue_font}${grey_background}I am ztj.${reset_normal}"
echo "${blue_font}${grey_background}I work in the Bayshore Consulting & Services Co.,Ltd.${reset_normal}"
echo "${blue_font}${grey_background}I am from XX,China Mainland .${reset_normal}"exit 0
[root@elasticsearch ~]# cat tput.sh 
#!/bin/bashblue_font=$(tput setaf 4)
grey_background=$(tput setab 7)
reset_normal=$(tput sgr0)#
echo "${blue_font}${grey_background}I am ztj.${reset_normal}"
echo "${blue_font}${grey_background}I work in the Bayshore Consulting & Services Co.,Ltd.${reset_normal}"
echo "${blue_font}${grey_background}I am from XX,China Mainland .${reset_normal}"exit 0
[root@elasticsearch ~]# sh tput.sh 
I am ztj.
I work in the Bayshore Consulting & Services Co.,Ltd.
I am from XX,China Mainland .
[root@elasticsearch ~]# 

http://www.fp688.cn/news/156048.html

相关文章:

  • 简述网络营销的特点是什么湖南长沙seo
  • discuz做资讯网站自媒体135网站
  • 最权威的做网站设计哪家好网络营销师官网
  • wordpress模板双响徐州seo
  • 北京公司网站建设推荐交易链接大全
  • 网页设计中用div做网站例子今日热点
  • 网站设计用的技术关键词排名公司
  • 大连建设网站便民服务互联网营销师证书有用吗
  • 建站公司专业定制中国十大广告公司排行榜
  • 义乌系统开发青岛seo服务哪家好
  • 前端学习网站百度seo优化推广
  • 网站的联系我们怎么做企业宣传软文范例
  • 做的网站怎么放在网上seo公司后付费
  • 1个ip可以做几个网站吗南京seo外包
  • 网站建设百度搜索到左边的图seo的基础是什么
  • 网站可以自己做吗小程序开发平台有哪些
  • 酒店网络设计方案seo外包品牌
  • 京东网站设计特点深圳谷歌seo公司
  • 动态网站开发从入门到实践外包网络推广公司推广网站
  • 软件研发和开发的区别seo关键词排名优化的方法
  • 洛宁网站建设湖南省人民政府
  • ps模板网站推荐厦门百度快速优化排名
  • 新疆伊犁河建设管理局网站百度seo快速排名
  • 自己网站做反链常州百度推广代理
  • 织梦网站联系我们的地图怎么做网络推广和网络营销的区别
  • 意大利语网站建设苏州百度快照优化排名
  • 拉了专线可以直接做网站吗军事最新消息
  • 免费ppt模板网站哪个好用活动策划公司
  • 有网站后台模板如何做数据库seo关键字排名优化
  • 网站建设 服务器nba排名西部和东部