> For the complete documentation index, see [llms.txt](https://wiki.clay-wangzhi.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.clay-wangzhi.com/shell/part2/04_introduction_to_variables_and_parameters.md).

# 4. 变量与参数

## 本章目录

* [4.1 变量替换](/shell/part2/04_introduction_to_variables_and_parameters/04_1_variable_substitution.md)
* [4.2 变量赋值](/shell/part2/04_introduction_to_variables_and_parameters/04_2_variable_assignment.md)
* [4.3 Bash变量弱类型](/shell/part2/04_introduction_to_variables_and_parameters/04_3_bash_variables_are_untyped.md)
* [4.4 特殊变量类型](/shell/part2/04_introduction_to_variables_and_parameters/04_4_special_variable_types.md)

变量（variable）在编程语言中用来表示数据。它本身只是一个标记，指向数据在计算机内存中的一个或一组地址。

变量通常出现在算术运算，数量操作及字符串解析中。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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://wiki.clay-wangzhi.com/shell/part2/04_introduction_to_variables_and_parameters.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.
