Adventures
4 分钟阅读
但是等等… 还有更多! But Wait… There’s More!
https://linuxcommand.org/lc3_adventures.php
This collection is a supplement to my book, The Linux Command Line (TLCL), so if you don’t already have a copy, please download one or, if you prefer, pick up a printed copy from your favorite bookseller or library. We are going to build on our experience with the command line and add some more tools and techniques to our repertoire. Like TLCL, this collection is not about Linux system administration; rather it is a collection of topics I consider both fun and interesting. It covers many tools that will be of interest to budding system administrators, but the topics were chosen for other reasons. Some were chosen because they are “classic” Unix, others because they are just “something you should know,” but mostly they were chosen because I find them fun and interesting.
这个系列是我的书籍《Linux命令行》(TLCL) 的补充内容,所以如果你还没有一本,请下载一本,或者如果你愿意,可以从你喜欢的书店或图书馆购买一本印刷版。我们将在命令行的基础上构建并添加一些更多的工具和技巧。和 TLCL 一样,这个系列不是关于 Linux 系统管理,而是我认为有趣和有意思的主题的集合。它涵盖了许多对于新手系统管理员有兴趣的工具,但这些主题是出于其他原因选择的。有些是因为它们是 “经典 “的 Unix,其他的是因为它们是 “你应该知道的东西 “,但大部分是因为我觉得它们有趣和有意思。
The adventures are also available in book form.
这些探险也以图书形式提供。
目录 Contents
Midnight Commander
We will look at Midnight Commander, a character-based directory browser and file manager that bridges the two worlds of the familiar graphical file manager and the common command line tools such as
cp
,mv
, andrm
.我们将介绍 Midnight Commander,这是一个基于字符的目录浏览器和文件管理器,它连接了熟悉的图形化文件管理器和常见的命令行工具,如
cp
、mv
和rm
。Terminal Multiplexers
What if we could run multiple terminal sessions inside a single terminal window? Or how about if we could detach a running session and return to it later, on a different machine? Sound impossible? It’s not.
如果我们能够在单个终端窗口中运行多个终端会话会怎么样?或者如果我们能够分离一个正在运行的会话,并在以后的时间在另一台机器上恢复它呢?听起来不可能吗?其实不是。
Less Typing
Fingers getting tired? Wrists starting to ache? Time to learn how do more with less typing.
手指累了吗?手腕开始疼痛吗?是时候学会更少打字了。
More Redirection
We’ll look at I/O redirection again in a little more depth and learn a few tricks along the way.
我们将更深入地了解 I/O 重定向,并学习一些相关的技巧。
tput
While our command line environment is certainly powerful, it can be lacking when it comes to visual appeal. It doesn’t have to be that way. Learn to take control of terminal output and add some visual spice.
虽然我们的命令行环境非常强大,但在视觉上可能有所欠缺。事实并非如此。学会控制终端输出,添加一些视觉效果。
dialog
We’re going to look at
dialog
, a program that displays various kinds of dialog boxes that we can incorporate into our shell scripts to give them a much friendlier face.我们将使用
dialog
,一个显示各种类型的对话框的程序,将它们融入我们的Shell脚本中,使它们具有更友好的界面。AWK
One of the great things we can do in the shell is embed other programming languages within the body of our scripts. In this adventure, we are going to look at one such program,
awk
, a classic pattern matching and text processing language.在Shell中,我们可以在脚本的正文中嵌入其他编程语言。在这个探险中,我们将学习一个名为
awk
的程序,它是一种经典的模式匹配和文本处理语言。Other Shells
While we have spent a great deal of time learning the bash shell, it’s not the only game in town. Unix has had several popular shells and almost all are available for Linux, too.
虽然我们花了很多时间学习bash shell,但它并不是唯一的选择。Unix有几个流行的Shell,几乎所有这些Shell都可以在Linux上使用。
Power Terminals
In this adventure, we are going to look at a few of the different terminal programs and the many interesting things we can do with them.
在这个探险中,我们将看一下几种不同的终端程序以及我们可以用它们做的许多有趣的事情。
Vim, with Vigor
Vim is a very powerful program. In fact, it’s safe to say that vim can do anything. It’s just a question of figuring out how. In this adventure, we will acquire an intermediate level of skill in this popular tool.
Vim 是一个非常强大的程序。事实上,可以说 vim 可以做任何事情。只是一个问题,就是弄清楚如何做。在这个探险中,我们将掌握这个流行工具的中级技能。
source
We looked at
source
briefly when we worked with the.profile
and.bashrc
files used to establish the shell environment.我们在处理用于建立shell环境的
.profile
和.bashrc
文件时简要介绍了source
。In this adventure, we will look at
source
again and discover the ways it can make our scripts more powerful and easier to maintain.在这个探险中,我们将再次学习
source
,并发现它如何使我们的脚本更强大、更易于维护。编码标准 第一部分
Most programming organizations have formal standards for coding practice and style. We will look at some and create one of our own.
大多数编程组织都有正式的编码实践和风格标准。我们将看一些标准,并创建自己的标准。
编码标准 第二部分
There’s one problem with having a coding standard. Once you have it, you have to follow it. In this adventure we will learn about
new_script
, a shell script template generator that performs much of the tedious mechanical work.有一个问题是制定了编码标准。一旦你制定了标准,就必须遵守它。在这个探险中,我们将了解
new_script
,它是一个生成shell脚本模板的工具,可以完成很多繁琐的机械工作。SQL
Structured Query Language (SQL) is the lingua franca of the database world. It’s also a useful and important skill. In this adventure, we will look at its major features and techniques, as well as discover a command-line tool that makes SQL easy to use with our scripts and projects.
结构化查询语言(SQL)是数据库世界的通用语言。它也是一项有用且重要的技能。在这个探险中,我们将介绍它的主要特性和技巧,以及发现一个命令行工具,使得在我们的脚本和项目中使用SQL变得容易。