# 第一部分 初见shell

> Script: A writing; a written document. \[Obs.]
>
> 脚本：文章；书面文档。
>
> \--Webster's Dictionary, 1913 ed.
>
> \--韦伯斯特字典1913年版

Shell是一种命令解释器，它不仅分离了用户层与操作系统内核，更是一门强大的编程语言。我们将使用shell编写的程序称之为脚本（script）。脚本是一种易于使用的工具，它能够将系统调用、工具软件、实用程序（utility）和已编译的二进制文件联系在一起构建程序。实际上，shell脚本可以调用所有的UNIX命令、实用程序以及工具软件。如果你觉得这还不够，使用像 `test` 命令和循环结构这样的shell内建命令能够让脚本更加灵活强大。Shell脚本特别适合完成系统管理任务和那些不需要复杂结构性语言实现的重复工作。

## 内容目录

* [1. 为什么使用shell编程](/advanced-bash-scripting-guide-in-chinese/zheng-wen/part1/01_shell_programming.md)
* [2. 和Sha-Bang（#!）一起出发](/advanced-bash-scripting-guide-in-chinese/zheng-wen/part1/02_starting_off_with_a_sha_bang.md)
  * [2.1 调用一个脚本](/advanced-bash-scripting-guide-in-chinese/zheng-wen/part1/02_starting_off_with_a_sha_bang/02_1_invoking_the_script.md)
  * [2.2 牛刀小试](/advanced-bash-scripting-guide-in-chinese/zheng-wen/part1/02_starting_off_with_a_sha_bang/02_2_preliminary_exercises.md)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://linuxstory.gitbook.io/advanced-bash-scripting-guide-in-chinese/zheng-wen/part1.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
