目录(Table of Contents)
-
简介(Introduction)
1.1 什么是 Bash?(What is Bash?)
1.2 什么是 Shell?(What is a shell?)
-
名词定义(Definitions)
-
Shell 基本特性(Basic Shell Features)
3.1 Shell 语法(Shell Syntax)
3.1.1 Shell操作(Shell Operation) 3.1.2 引用(Quoting) 3.1.2.1 转义字符(Escape Character) 3.1.2.2 单引号引用(Single Quotes) 3.1.2.3 双引号引用(Double Quotes) 3.1.2.4 ANSI-C引用(ANSI-C Quoting) 3.1.2.5 特殊区域语言转换(Locale-Specific Translation) 3.1.3 注释(Comments)3.2 Shell 命令(Shell Commands)
3.2.1 保留字(Reserved Words) 3.2.2 简单命令(Simple Commands) 3.2.3 管道(Pipelines) 3.2.4 命令列表(Lists of Commands) 3.2.5 复合命令(Compound Commands) 3.2.5.1 循环结构体(Looping Constructs) 3.2.5.2 判断结构体(Conditional Constructs) 3.2.5.3 成组命令(Grouping Commands) 3.2.6 协同处理(Coprocesses) 3.2.7 GNU并行(GNU Parallel)3.3 Shell 函数(Shell Functions)
3.4 Shell 参数(Shell Parameters)
3.4.1 位置参数(Positional Parameters) 3.4.2 特殊参数(Special Parameters)3.5 Shell 扩展(Shell Expansions)
3.5.1 大括号扩展(Brace Expansion) 3.5.2 波浪号扩展(Tilde Expansion) 3.5.3 Shell参数扩展(Shell Parameter Expansion) 3.5.4 命令替换(Command Substitution) 3.5.5 算术扩展(Arithmetic Expansion) 3.5.6 进程替换(Process Substitution) 3.5.7 单词分割(Word Splitting) 3.5.8 文件名扩展(Filename Expansion) 3.5.8.1 样式匹配(Pattern Matching) 3.5.9 引用移除(Quote Removal)3.6 重定向(Redirections)
3.6.1 输入重定向(Redirecting Input) 3.6.2 输出重定向(Redirecting Output) 3.6.3 输出重定向追加(Appending Redirected Output) 3.6.4 标准输出和标准报错重定向(Redirecting Standard Output and Standard Error) 3.6.5 标准输出和标准报错追加(Appending Standard Output and Standard Error) 3.6.6 多行字符串重定向(Here Documents) 3.6.7 单行字符串重定向(Here Strings) 3.6.8 文件描述符复制(Duplicating File Descriptors) 3.6.9 文件描述符移动(Moving File Descriptors) 3.6.10 用于读取和写入的文件描述符打开(Opening File Descriptors for Reading and Writing)3.7 命令执行(Executing Commands)
3.7.1 简单命令扩展(Simple Command Expansion) 3.7.2 命令搜索和执行(Command Search and Execution) 3.7.3 命令执行环境(Command Execution Environment) 3.7.4 环境(Environment) 3.7.5 退出状态(Exit Status) 3.7.6 信号(Signals)3.8 Shell 脚本(Shell Scripts)
-
Shell 内建命令(Shell Builtin Commands)
4.1 Bourne Shell 内建命令(Bourne Shell Builtins)
4.2 Bash 内建命令(Bash Builtin Commands)
4.3 修改 Shell 行为(Modifying Shell Behavior)
4.3.1 内建命令set(The Set Builtin) 4.3.2 内建命令shopt(The Shopt Builtin)4.4 特殊内建命令(Special Builtins)
-
Shell 变量(Shell Variables)
5.1 Bourne Shell 变量(Bourne Shell Variables)
5.2 Bash 变量(Bash Variables)
-
Bash 特性(Bash Features)
6.1 Bash 调用(Invoking Bash)
6.2 Bash 启动文件(Bash Startup Files)
6.3 交互式 shell(Interactive Shell)
6.3.1 什么是交互式shell?(What is an Interactive Shell?) 6.3.2 这是shell交互吗?(Is this Shell Interactive?) 6.3.3 交互式shell的行为(Interactive Shell Behavior)6.4 Bash 条件表达式(Bash Conditional Expressions)
6.5 Shell 算术运算(Shell Arithmetic)
6.6 别名(Aliases)
6.7 数组(Arrays)
6.8 目录堆栈(The Directory Stack)
6.8.1 目录堆栈的内建命令(Directory Stack Builtins)6.9 提示符控制(Controlling the Prompt)
6.10 受限 shell(The Restricted Shell)
6.11 Bash POSIX 模式(Bash POSIX Mode)
6.12 shell 兼容模式(Shell Compatibility Mode)
-
作业控制(Job Control)
7.1 作业控制基础(Job Control Basics)
7.2 作业控制的内建命令(Job Control Builtins)
7.3 作业控制的变量(Job Control Variables)
-
命令行编辑(Command Line Editing)
8.1 行编辑介绍(Introduction to Line Editing)
8.2 Readline 交互(Readline Interaction)
8.2.1 Readline 基础(Readline Bare Essentials) 8.2.2 Readline 移动命令(Readline Movement Commands) 8.2.3 Readline 终止命令(Readline Killing Commands) 8.2.4 Readline 的参数(Readline Arguments) 8.2.5 在历史中搜索命令(Searching for Commands in the History)8.3 Readline 初始化文件(Readline Init File)
8.3.1 Readline初始化文件语法(Readline Init File Syntax) 8.3.2 条件初始化结构(Conditional Init Constructs) 8.3.3 初始化文件实例(Sample Init Constructs)8.4 可绑定的 Readline 命令(Bindable Readline Commands)
8.4.1 移动命令(Commands For Moving) 8.4.2 操纵历史的命令(Commands For Manipulating The History) 8.4.3 变更文本的命令(Commands For Changing Text) 8.4.4 终止和拉回(Killing And Yanking) 8.4.5 指定数字参数(Specifying Numeric Arguments) 8.4.6 让Readline替你输入(Letting Readline Type For You) 8.4.7 键盘宏(Keyboard Macros) 8.4.8 一些其它的命令(Some Miscellaneous Commands)8.5 Readline 的 vi 模式(Readline vi Mode)
8.6 可编程补全(Programmable Completion)
8.7 可编程补全内建命令(Programmable Completion Builtins)
8.8 一个可编程补全的例子(A Programmable Completion Example)
-
使用历史交互(Using History Interactively)
9.1 Bash 历史功能(Bash History Facilities)
9.2 Bash 内建历史命令(Bash History Builtins)
9.3 历史扩展(History Expansion)
9.3.1 事件标志符(Event Designators) 9.3.2 单词标志符(Word Designators) 9.3.3 修饰符(Modifiers) -
Bash 安装(Installing Bash)
10.1 基础安装(Basic Installation)
10.2 编译器和选项(Compilers and Options)
10.3 为多架构编译(Compiling For Multiple Architectures)
10.4 安装名称(Installation Names)
10.5 指定系统类型(Specifying the System Type)
10.6 共享默认值(Sharing Defaults)
10.7 操作控制(Operation Controls)
10.8 可选特性(Optional Features)