按年被提到
20082020 · 13 次2026
开源书›系统与网络·No.23·简称 ABS Guide

Advanced Bash-Scripting Guide

高级 Bash 脚本编程指南
Mendel Cooper

覆盖 Bash 语法、内建命令与大量示例脚本的在线手册

免费阅读 ↗
被推荐 · 100 人首次 2008-05-16 · 最近 2026-07-26许可证 公有领域
100不同的人
69活跃月份
34有推荐的月份
94讨论串

Mendel Cooper 编写、收录在 TLDP 的 Bash 脚本长篇指南,既能当教程顺序读,也能当参考手册查。内容涵盖变量、引用、测试、循环、函数、进程替换、here document 等语法,并附有大量完整的示例脚本。它的特点是细节全、例子多,但条目偏多、编排不算紧凑,更适合查阅而不是一口气读完。

HN 为什么推荐它

HN 上的人常把它当作学习和查阅 Bash 的现成资源,用来解释进程替换、退出码、算术展开等具体语法;有人指出示例脚本没有按难度排序,也有人觉得 TLDP 的其他 HOWTO 更实用易读。

难度 2 / 5约 25 小时开放许可
适合谁

要写或维护 Shell 脚本的开发者与运维

读之前最好知道
1Linux 命令行基础
2基本编程概念

怎么读

由 Claude 根据这本书和 HN 上的说法整理,可能有错
  1. 1先学完基础,再带着具体问题来查对应章节
  2. 2边读边在终端里运行示例,改改参数看结果
  3. 3重点看引用、参数展开和进程替换这几类易错处
  4. 4可以和 man bash 配合,遇到分歧以手册为准

HN 书评

推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算
推荐jasonrojas · 2011-02

“More info on exit codes: Advanced Bash-Scripting Guide”

拿它补充 exit codes 的更多信息
Ask HN: Help with BASH Scripting?原评论 ↗
推荐zacharyvoase · 2011-02

“See Advanced Bash-Scripting Guide for more information.”

引它补充从 process substitution 读取变量的内容
Insufficiently known Posix shell features原评论 ↗
推荐nikcub · 2011-04

“- Advanced Bash Scripting (online): Advanced Bash-Scripting Guide”

把它列为学 bash 脚本的在线资源
Must Read CS Books For Self Self-Taught Programmers原评论 ↗
推荐raghava · 2011-04

“I forward Advanced Bash-Scripting Guide to everyone who joins my team newly; though only a very few of them make use of it, it would help a lot!”

转发给每个新入队的同事,虽然很少有人用
Data Science Hand Tools: Unix Power tools Revisited原评论 ↗
推荐foob · 2011-09

“I would like to add the Advanced Bash-Scripting Guide as an incredible resource.”

称它是出色的资源,老手也学到很多
Miguel de Icaza: Learning Unix原评论 ↗
推荐dalke · 2011-10

“A quick Google search found Advanced Bash-Scripting Guide and there are many others.”

把它当作 bash 示例脚本的来源
What are some cool batch file program codes?原评论 ↗
看全部 20 条 →
推荐samaraga · 2012-02

“Advanced Bash Scripting Guide by Mendel Cooper has some good scripts which I have come across for some practice but it isn't ordered.”

说里面有不错的练习脚本,但没有顺序
How I Learned to Program原评论 ↗
推荐nonamegiven · 2013-03

“Learn you a shell:”

列为可离线学习的 shell 资源
Learning to code, with no Internet access.原评论 ↗
推荐coolj · 2013-08

“TLDP's Advanced Bash-Scripting Guide is a great resource for learning bash.”

称它是学 bash 的好资源,可用来查 $* 的含义
What I learned from others' shell scripts原评论 ↗
推荐a3n · 2013-12

“You'll get here soon enough: Advanced Bash-Scripting Guide: Advanced Bash-Scripting Guide”

说学完基础很快就会读到它
Ask HN: Best Open Source Beginners Book for learning Shell原评论 ↗
推荐anon4 · 2014-04

“It's two different syntaxes.”

引它说明 here-document 的引号与展开
Better bash in 15 minutes原评论 ↗
推荐Filligree · 2015-03

“For this in particular, try the Advanced Bash Scripting doc, Advanced Bash-Scripting Guide”

建议查它,里面有 process substitution 等 shell 构造
The Mighty Named Pipe原评论 ↗
推荐benj2240 · 2015-08

“You might like the Advanced Bash Scripting Guide.”

说它既是教材和自学手册,也是 shell 脚本的参考
Ask HN: How to be a good bash script writer?原评论 ↗
推荐SwellJoe · 2016-11

“the TLDP bash programming HOWTOs were more pragmatic and easy to follow (I think that's here: (链接) and Advanced Bash-Scripting Guide )”

指向 TLDP 的 bash 材料,觉得比它更实用易懂
Humble Book Bundle: Unix原评论 ↗
推荐JadeNB · 2017-05

“as I just learned from ABS, `$(( ))`”

说自己从 ABS 学到了 $(( )) 算术展开
The increased use of PowerShell in attacks [pdf]原评论 ↗
推荐tmzt · 2017-06

“See the section under Substring Replacement.”

指向它的 Substring Replacement 一节
Show HN: Welder – set up your Linux server with plain shell scripts原评论 ↗
推荐rajeshmr · 2017-06

“Advanced - Advanced Bash-Scripting Guide”

推荐当作提高 bash 水平的进阶资料
Ask HN: How can I get better at bash?原评论 ↗
推荐gerdesj · 2018-01

“I'll drop this: Advanced Bash-Scripting Guide If anyone, who has to do anything BASH related, has not seen it then they should!”

说凡是要写 bash 的人都应该看看
More Things I Wish I’d Known About Bash原评论 ↗
推荐jypepin · 2018-03

“DMOZ seems to have some good resources, going through it quickly I found Advanced Bash-Scripting Guide which has a very good bash intro!”

说在 DMOZ 上找到它,是很好的 bash 入门
Fred's ImageMagick Scripts原评论 ↗
推荐theonemind · 2019-01

“advanced bash scripting guide:”

推荐学 Bash 时读它
Bash 5.0 released原评论 ↗