《Bash it out》书评：用这本谜题书学习 Bash
Bash 书评

> 
> 《Bash it out》使用 16 个谜题，涵盖了基本、中级和高级 Bash 脚本。
> 
> 
> 


![](/data/attachment/album/202107/03/154134jgm2m82o76mrm2o7.jpg "Puzzle pieces coming together to form a computer screen")


计算机既是我的爱好，也是我的职业。我的公寓里散布着大约 10 台计算机，它们都运行 Linux（包括我的 Mac）。由于我喜欢升级我的电脑和提升我的电脑技能，当我遇到 Sylvain Leroux 的《[Bash it out](https://www.amazon.com/Bash-Out-Strengthen-challenges-difficulties/dp/1521773262/)》时，我抓住了购买它的机会。我在 Debian Linux 上经常使用命令行，这似乎是扩展我的 Bash 知识的好机会。当作者在前言中解释他使用 Debian Linux 时，我笑了，这是我最喜欢的两个发行版之一。


Bash 可让你自动执行任务，因此它是一种省力、有趣且有用的工具。在阅读本书之前，我已经有相当多的 Unix 和 Linux 上的 Bash 经验。我不是专家，部分原因是脚本语言非常广泛和强大。当我在基于 Arch 的 Linux 发行版 [EndeavourOS](https://endeavouros.com/) 的欢迎屏幕上看到 Bash 时，我第一次对 Bash 产生了兴趣。


以下屏幕截图显示了 EndeavourOS 的一些选项。你可能不相信，这些面板只指向 Bash 脚本，每个脚本都完成一些相对复杂的任务。而且因为它都是开源的，所以我可以根据需要修改这些脚本中的任何一个。


![EndeavourOS after install](/data/attachment/album/202107/03/154143wg356agqysgigks1.png "EndeavourOS after install")


![EndeavourOS install apps](/data/attachment/album/202107/03/154143f993g989l9ujutii.png "EndeavourOS install apps")


### 总有东西要学


我对这本书的印象非常好。虽然不长，但经过了深思熟虑。作者对 Bash 有非常广泛的了解，并且具有解释如何使用它的不可思议的能力。这本书使用 16 个谜题涵盖了基本、中级和高级 Bash 脚本，他称之为“挑战”。这教会了我将 Bash 脚本视为需要解决的编程难题，这让我玩起来更有趣。


Bash 的一个令人兴奋的方面是它与 Linux 系统深度集成。虽然它的部分能力在于它的语法，但它也很强大，因为它可以访问很多系统资源。你可以编写重复性任务或简单但厌倦了手动执行的任务的脚本。不管是大事还是小事，《Bash it out》可以帮助你了解可以做什么以及如何实现它。


如果我不提及 David Both 的发布在 [Opensource.com](http://Opensource.com) 的免费资源《[A sysadmin's guide to Bash scripting\_](https://opensource.com/downloads/bash-scripting-ebook)》，这篇书评就不会完整。这个 17 页的 PDF 指南与《Bash it out》不同，但它们共同构成了任何想要了解它的人的成功组合。


我不是计算机程序员，但《Bash it out》增加了我进入更高级 Bash 脚本水平的欲望——虽然没有这个打算，但我可能最终无意中成为一名计算机程序员。


我喜欢 Linux 的原因之一是因为它的操作系统功能强大且用途广泛。无论我对 Linux 了解多少，总有一些新东西需要学习，这让我更加欣赏 Linux。


在竞争激烈且不断变化的就业市场中，我们所有人都应该不断更新我们的技能。这本书帮助我以非常实际的方式学习了 Bash。几乎感觉作者和我在同一个房间里，耐心地指导我学习。


作者 Leroux 具有不可思议的能力去吸引读者。这是一份难得的天赋，我认为比他的技术专长更有价值。事实上，我写这篇书评是为了感谢作者预见了我自己的学习需求；虽然我们从未见过面，但我从他的天赋中受益匪浅。




---


via: <https://opensource.com/article/20/4/bash-it-out-book>


作者：[Carlos Aguayo](https://opensource.com/users/hwmaster1) 选题：[lujun9972](https://github.com/lujun9972) 译者：[baddates](https://github.com/baddates) 校对：[wxy](https://github.com/wxy)


本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译，[Linux中国](https://linux.cn/) 荣誉推出


OK
Computers are both my hobby and my profession. I have about 10 of them scattered around my apartment, all running Linux (including my Macs). Since I enjoy upgrading my computers and my computer skills, when I came across [ Bash it out](https://www.amazon.com/Bash-Out-Strengthen-challenges-difficulties/dp/1521773262/) by Sylvain Leroux, I jumped on the chance to buy it. I use the command line a lot on Debian Linux, and it seemed like a great opportunity to expand my Bash knowledge. I smiled when the author explained in the preface that he uses Debian Linux, which is one of my two favorite distributions.

Bash lets you automate tasks, so it's a labor-saving, interesting, and useful tool. Before reading the book, I already had a fair amount of experience with Bash on Unix and Linux. I'm not an expert, in part because the scripting language is so extensive and powerful. I first became intrigued with Bash when I saw it on the welcome screen of [EndeavourOS](https://endeavouros.com/), an Arch-based Linux distribution.

The following screenshots show some options from EndeavourOS. Beleieve it or not, these panels just point to Bash scripts, each of which accomplish some relatively complex tasks. And because it's all open source, I can modify any of these scripts if I want.

![EndeavourOS welcome EndeavourOS after install](https://opensource.com/sites/default/files/uploads/endeavouros-welcome.png)

![EndeavourOS install apps EndeavourOS install apps](https://opensource.com/sites/default/files/uploads/endeavouros-install-apps.png)

## Always something to learn

My impressions of this book are very favorable. It's not long, but it is well-thought-out. The author has very extensive knowledge of Bash and an uncanny ability to explain how to use it. The book covers basic, medium, and advanced Bash scripting using 16 puzzles, which he calls "challenges." This taught me to see Bash scripting as a programming puzzle to solve, which makes it more interesting to play with.

An exciting aspect of Bash is that it's deeply integrated with the Linux system. While part of its power lies in its syntax, it's also powerful because it has access to so much. You can script repetitive tasks, or tasks that are easy but you're just tired of performing manually. Nothing is too great or too small, and *Bash it out *helps you understand both what you can do, and how to achieve it.

This review would not be complete if I didn't mention David Both's free resource [ A sysadmin's guide to Bash scripting](https://opensource.com/downloads/bash-scripting-ebook) on Opensource.com. This 17-page PDF guide is different from

*Bash it out*, but together they make a winning combination for anyone who wants to learn about it.


I am not a computer programmer, but *Bash it out* has increased my desire to get into more advanced levels of Bash scripting—I might inadvertently end up as a computer programmer without planning to.

One reason I love Linux is because of how powerful and versatile the operating system is. However much I know about Linux, there is always something new to learn that makes me appreciate Linux even more.

In a competitive and ever-changing job market, it behooves all of us to continuously update our skills. This book helped me learn Bash in a very hands-on way. It almost felt as if the author was in the same room with me, patiently guiding me in my learning.

The author, Leroux, has an uncanny ability to engage readers. This is a rare gift that I think is even more valuable than his technical expertise. In fact, I am writing this book review to thank the author for anticipating my own learning needs; although we have never met, I have benefited in real ways from his gifts.

## 6 Comments