geekdoc-python-zh/docs/pythonland/62.md

28 lines
1.4 KiB
Markdown
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

# 使用 Unix Shell
> 原文:[https://python.land/the-unix-shell](https://python.land/the-unix-shell)
用 Python 你几乎可以做任何事情!尽管如此,精通命令行还是很有价值的。一个精心制作的 bash 命令或脚本可以节省您自己编写代码(或手工编写代码)的时间!).
目录
* [Unix 哲学](#The_Unix_philosophy "The Unix philosophy")
* [Linux 命令和脚本](#Linux_commands_and_scripting "Linux commands and scripting")
## Unix 哲学
Unix 命令行已经存在了几十年,并且仍然很强大。这一成功部分来自 Unix 理念:
* 写程序做一件事,并把它做好。
* 写程序一起工作。
* 编写处理文本流的程序,因为那是一个通用接口。
当使用命令行时,最好记住这个原则。你会发现总有一种工具组合能完全满足你的需要。艺术是找到它们并正确地组合它们。
## Linux 命令和脚本
我将主要关注 Linux但是您将要学习的内容也适用于其他类似 Unix 的操作系统,比如 MacOS 或基于 BSD 的发行版。我建议你从学习最常用、最需要的 [Linux 命令](https://python.land/the-unix-shell/basic-linux-commands)开始。之后,你可以学习[如何编写 Bash 脚本](https://python.land/the-unix-shell/creating-bash-scripts),例如,自动化你的 Python 开发过程的一部分。