diff --git a/sources/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md b/sources/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md deleted file mode 100644 index 94a0c28a25..0000000000 --- a/sources/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md +++ /dev/null @@ -1,68 +0,0 @@ -[#]: collector: (lujun9972) -[#]: translator: (Chao-zhi) -[#]: reviewer: ( ) -[#]: publisher: ( ) -[#]: url: ( ) -[#]: subject: (7 Bash tutorials to enhance your command line skills in 2021) -[#]: via: (https://opensource.com/article/21/1/bash) -[#]: author: (Jim Hall https://opensource.com/users/jim-hall) - -7 Bash tutorials to enhance your command line skills in 2021 -====== -Bash is the default command line shell on most Linux systems. So why not -learn how to get the most out of it? -![Terminal command prompt on orange background][1] - -Bash is the default command line shell on most Linux systems. So why not learn how to get the most out of it? This year, Opensource.com featured many great articles to help you leverage the power of the Bash shell. These are some of the most-read articles about Bash: - -## [Read and write data from anywhere with redirection in the Linux terminal][2] - -Redirection of input and output is a natural function of any programming or scripting language. Technically, it happens inherently whenever you interact with a computer. Input gets read from stdin (standard input, usually your keyboard or mouse), output goes to stdout (standard output, a text or data stream), and errors get sent to stderr. Understanding that these data streams exist enables you to control where information goes when you're using a shell such as Bash. Seth Kenlon shared these great tips to get data from one place to another without a lot of mouse moving and key pressing. You may not use redirection often, but learning to use it can save you a lot of time needlessly opening files and copying and pasting data. - -## [Get started with Bash scripting for sysadmins][3] - -Bash is free and open source software, so anyone can install it, whether they run Linux, BSD, OpenIndiana, Windows, or macOS. Seth Kenlon helps you learn the commands and features that make Bash one of the most powerful shells available. - -## [Try this Bash script for large filesystems][4] - -Have you ever wanted to list all the files in a directory, but just the files, nothing else? How about only the directories? If you have, then Nick Clifton's article might be just what you're looking for. Nick shares a nifty Bash script that can list directories, files, links, or executables. The script works by using the **find** command to do the searching, and then it runs **ls** to show details. It's a clever solution for anyone managing a large Linux system. - -## [Screenshot your Linux system configuration with Bash tools][5] - -There are many reasons you might want to share your Linux configuration with other people. You might be looking for help troubleshooting a problem on your system, or maybe you're so proud of the environment you've created that you want to showcase it to fellow open source enthusiasts. Don Watkins shows us screenFetch and Neofetch to capture and share your system configuration. - -## [6 Handy Bash scripts for Git][6] - -Git has become a ubiquitous code management system. Knowing how to manage a Git repository can streamline your development experience. Bob Peterson shares six Bash scripts that will make your life easier when you're working with Git repositories. **gitlog** prints an abbreviated list of current patches against the master version. Variations of the script can show the patch SHA1 IDs or search for a string within a collection of patches. - -## [5 ways to improve your Bash scripts][7] - -A system admin often writes Bash scripts, some short and some quite lengthy, to accomplish various tasks. Alan Formy-Duval explains how you can make your Bash scripts simpler, more robust, and easier to read and debug. We might assume that we need to employ languages, such as Python, C, or Java, for higher functionality, but that's not necessarily true. The Bash scripting language is very powerful. There is a lot to learn to maximize its usefulness. - -## [My favorite Bash hacks][8] - -Katie McLaughlin helps you improve your productivity with aliases and other shortcuts for the things you forget too often. When you work with computers all day, it's fantastic to find repeatable commands and tag them for easy use later on. Katie's summary of useful Bash features and helper commands to save you time. - -These Bash tips take an already powerful shell to a whole new level of usefulness. Feel free to share your own tips, too. - --------------------------------------------------------------------------------- - -via: https://opensource.com/article/21/1/bash - -作者:[Jim Hall][a] -选题:[lujun9972][b] -译者:[Chao-zhi](https://github.com/Chao-zhi) -校对:[校对者ID](https://github.com/校对者ID) - -本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 - -[a]: https://opensource.com/users/jim-hall -[b]: https://github.com/lujun9972 -[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) -[2]: https://opensource.com/article/20/6/redirection-bash -[3]: https://opensource.com/article/20/4/bash-sysadmins-ebook -[4]: https://opensource.com/article/20/2/script-large-files -[5]: https://opensource.com/article/20/1/screenfetch-neofetch -[6]: https://opensource.com/article/20/1/bash-scripts-git -[7]: https://opensource.com/article/20/1/improve-bash-scripts -[8]: https://opensource.com/article/20/1/bash-scripts-aliases diff --git a/translated/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md b/translated/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md new file mode 100644 index 0000000000..c72e61228c --- /dev/null +++ b/translated/tech/20210111 7 Bash tutorials to enhance your command line skills in 2021.md @@ -0,0 +1,69 @@ +[#]: collector: (lujun9972) +[#]: translator: (Chao-zhi) +[#]: reviewer: ( ) +[#]: publisher: ( ) +[#]: url: ( ) +[#]: subject: (7 Bash tutorials to enhance your command line skills in 2021) +[#]: via: (https://opensource.com/article/21/1/bash) +[#]: author: (Jim Hall https://opensource.com/users/jim-hall) + +7 个 Bash 教程,提高你的命令行技能,2021 年版 +====== + +Bash 是大多数 Linux 系统上的默认命令行 shell。所以你为什么不试着学习如何最大限度地利用它呢? + +![Terminal command prompt on orange background][1] + +Bash 是大多数 Linux 系统上的默认命令行 shell。所以你为什么不试着学习如何最大限度地利用它呢?今年,Opensource.com 推荐了许多很棒的文章来帮助您充分利用 Bash shell 的强大功能。以下是一些关于 Bash 阅读次数最多的文章: + +## [在 Linux 终端中通过重定向从任何地方读取和写入数据 ][2] + +输入和输出重定向是任何编程或脚本语言的基础功能。从技术上讲,只要你与电脑互动,它就会自然而然地发生。输入从 stdin( 标准输入,通常是您的键盘或鼠标)读取,输出到 stdout (标准输出,一般是文本或数据流),而错误被发送到 stderr。了解这些数据流的存在,使您能够在使用 Bash 等 shell 时控制信息的去向。Seth Kenlon 分享了这些很棒的技巧,可以让你在不需要大量鼠标移动和按键的情况下从一个地方获取数据。您可能不经常使用重定向,但学习使用它可以为您节省大量不必要的打开文件和复制粘贴数据的时间。 + +## [系统管理员 Bash 脚本入门 ][3] + +Bash 是免费的开源软件,所以任何人都可以安装它,不管他们运行的是 Linux、BSD、OpenIndiana、Windows 还是 macOS。Seth Kenlon 帮助您学习如何使用 Bash 的命令和特性,使其成为最强大的 shell 之一。 + +## [试试这个针对大型文件系统的 Bash 脚本 ][4] + +您是否曾经想列出一个目录中的所有文件,只显示其中的文件,不包括其他内容?或者只显示目录?如果你有,那么 Nick Clifton 的文章可能正是你正在寻找的。Nick 分享了一个漂亮的 Bash 脚本,它可以列出目录、文件、链接或可执行文件。该脚本使用 **find** 命令进行搜索,然后运行 **ls** 显示详细信息。对于管理大型 Linux 系统的人来说,这是一个漂亮的解决方案。 + +## [用 Bash 工具对你的 Linux 系统配置进行快照 ][5] + +您可能想与他人分享您的 Linux 配置,原因有很多。您可能需要帮助排除系统上的一个问题,或者您对自己创建的环境非常自豪,想向其他开源爱好者展示它。Don Watkins 向我们展示了 screenFetch 和 Neofetch 来捕获和分享您的系统配置。 + +## [Git 的 6 个好用的 Bash 脚本 ][6] + +Git 已经成为一个无处不在的代码管理系统。了解如何管理 Git 存储库可以简化您的开发体验。Bob Peterson 分享了 6 个 Bash 脚本,它们将使您在使用 Git 存储库时更加轻松。**gitlog** 打印当前 patch 和 主版本的缩写列表。另一种脚本可以显示 patch 的 SHA1 id 或在一组 patch 中搜索字符串。 + +## [改进你 Bash 脚本的 5 种方法 ][7] + +系统管理员通常编写各种或长或短的 Bash 脚本,以完成各种任务。Alan Formy-Duval 解释了如何使 Bash 脚本更简单、更健壮、更易于阅读和调试。我们可能会考虑到我们需要使用诸如 Python、C 或 Java 之类的语言来实现更高的功能,但其实也不一定需要。因为 Bash 脚本语言就已经非常强大。要最大限度地发挥它的效用,还有很多东西要学。 + +## [我最喜欢的 Bash 技巧 ][8] + +Katie McLaughlin 帮助你提高你的工作效率,用别名和其他快捷方式解决你经常忘记的事情。当你整天与计算机打交道时,找到可重复的命令并标记它们以方便以后使用是非常美妙的。Katie 总结了一些有用的 Bash 特性和帮助命令,可以节省您的时间。 + +这些 Bash 小技巧将一个已经很强大的 shell 提升到一个全新的级别。也欢迎分享你自己的建议。 + +-------------------------------------------------------------------------------- + +via: https://opensource.com/article/21/1/bash + +作者:[Jim Hall][a] +选题:[lujun9972][b] +译者:[Chao-zhi](https://github.com/Chao-zhi) +校对:[校对者ID](https://github.com/校对者ID) + +本文由 [LCTT](https://github.com/LCTT/TranslateProject) 原创编译,[Linux中国](https://linux.cn/) 荣誉推出 + +[a]: https://opensource.com/users/jim-hall +[b]: https://github.com/lujun9972 +[1]: https://opensource.com/sites/default/files/styles/image-full-size/public/lead-images/terminal_command_linux_desktop_code.jpg?itok=p5sQ6ODE (Terminal command prompt on orange background) +[2]: https://opensource.com/article/20/6/redirection-bash +[3]: https://opensource.com/article/20/4/bash-sysadmins-ebook +[4]: https://opensource.com/article/20/2/script-large-files +[5]: https://opensource.com/article/20/1/screenfetch-neofetch +[6]: https://opensource.com/article/20/1/bash-scripts-git +[7]: https://opensource.com/article/20/1/improve-bash-scripts +[8]: https://opensource.com/article/20/1/bash-scripts-aliases