Using tput can help you in such conditions.
在此类情况下,使用tput可能会对您有所帮助。
什么是tput ?
If you want to clear the entire device, use tput clear.
如果您想要清除整个设备,请使用tput clear。
To reverse the current color scheme, simply execute tput rev.
要反显当前的颜色方案,只需执行tputrev。
To make the cursor invisible, use the civis option (for example, tput civis).
要使光标不可见,请使用civis选项(例如,tput civis)。
Moving the cursor’s position on the respective device is easily done with tput.
使用 tput 可以方便地实现在各设备上移动光标的位置。
To clear data from the current cursor position the end of a line, you use tput el.
要清除从当前光标位置到行尾的数据,可以使用tputel。
Introducing tput into shell scripts in UNIX can enhance the look and feel of scripts.
将tput引入UNIX中的shell脚本可以改善脚本的外观。
To clear data from the current cursor position to the end of the device, you use tput Ed.
要清除从当前光标位置到设备末尾的数据,可以使用tputed。
With tput and a bit of work, you can create a full-blown, menu-driven shell script that will look great!
通过tput和极少的工作量,您就可以创建看起来非常漂亮而全面的菜单驱动的shell脚本!
The script introduces how you can use many of the options in tput explained in this article to enhance your coding.
此脚本介绍了如何在tput 中使用本文中介绍的多个选项增强您的代码。
The tput command, like most commands in UNIX, can be used either at your shell command line or inside a shell script.
与UNIX中的大多数命令一样,tput命令既可以用在shell命令行中也可以用在shell脚本中。
When the information has been displayed, the cursor must return to the original location that was saved with tput sc.
在显示了这些信息之后,光标必须返回到使用tput sc保存的原始位置。
Further, rather than use arcane symbols and Numbers, modern UNIX systems use tput to look up and emit escapes by name or purpose.
另外,目前的UNIX系统并没有使用神秘的符号和数字,而是使用tput按名称或用途查找和产生转义。
To gain a better understanding of tput, this article starts with the command line, and then continues into shell script examples.
为让您更好地理解tput,本文首先从命令行讲起,然后紧接着讲述shell脚本示例。
Learning tput is easy and can be very effective for scripts; users will appreciate the benefits behind controlling the look of a screen more.
学习tput非常容易,并且可能对脚本是非常有效的;用户将从更多地控制屏幕的外观方面获益。
Now that you know the basics of tput from the command line, it's time to focus on putting what you've learned into a shell script along with some other features.
现在您已经了解了从命令行中执行tput 的基本知识,下面我们将重点讲述如何将您学到的知识连同其他一些功能用到 shell脚本中。
Using tput, you can alter several terminal capabilities, such as moving or altering the cursor, changing text properties, and clearing specific areas of the terminal screen.
通过使用tput,您可以更改几项终端功能,如移动或更改光标、更改文本属性,以及清除终端屏幕的特定区域。
First, here are some additional features that tput provides: extracting terminal information such as the devices, the number of columns and rows, and clearing data from the screen.
首先,tput提供了以下一些附加功能:提取终端信息(如设备,列数和行数)和清除屏幕上的数据。
First, here are some additional features that tput provides: extracting terminal information such as the devices, the number of columns and rows, and clearing data from the screen.
首先,tput提供了以下一些附加功能:提取终端信息(如设备,列数和行数)和清除屏幕上的数据。
应用推荐