---
title: Bash & Shell Scripting
description: Shell scripting automates work on Unix-like systems. You will learn Bash syntax, pipes, text tools like grep, sed and awk, and how to write robust scripts for everyday system and DevOps tasks.
category: programming-tech
subcategory: devops
difficulty: beginner, intermediate, advanced
url: /subject/bash-shell-scripting
---

# Bash & Shell Scripting

Shell scripting automates work on Unix-like systems. You will learn Bash syntax, pipes, text tools like grep, sed and awk, and how to write robust scripts for everyday system and DevOps tasks.

## Available Resources

2 Books • 1 Courses • 5 Websites

## Courses

### 1. The Missing Semester of Your CS Education: Shell Tools and Scripting

**Author:** Anish Athalye, Jon Gjengset, Jose Javier Gonzalez Ortiz

Covers Bash variables, quoting, control flow, functions, exit codes, globbing and shebangs, then finding files and code with find, fd, grep and ripgrep, and reusing shell history. Includes an hour-long lecture video, full notes and exercises; learners can write and debug small automation scripts.

**Difficulty:** Beginner | **Language:** English | **Price:** Free

**Link:** https://missing.csail.mit.edu/2020/shell-tools/

**Tags:** bash, shell-scripting, command-line, unix-tools, globbing

## Websites

### 1. Bash Pitfalls

**Author:** Greg Wooledge and contributors

Sixty-five annotated examples of shell code that looks correct and is not, each with the failure mechanism explained and a safe rewrite. Working through it shows why parsing ls, unquoted expansions and set -e break production scripts. BashGuide builds the model, Pitfalls stress-tests it against the specific failure modes that separate a script that works on your laptop from one that works on a fleet.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://mywiki.wooledge.org/BashPitfalls

**Tags:** bash, shell-scripting, debugging, quoting, best-practices

### 2. Google Shell Style Guide

**Author:** Google

Google's production conventions for Bash: file layout, quoting, variable expansion, function naming, checking return values, avoiding eval, and recognising when a script has outgrown the shell. Answers the question the reference manual deliberately does not: of the many legal ways to write something, which one survives a code review. Includes the 100-line rule — the honest guidance that shell has a ceiling. Short enough to read once and reuse as a review checklist.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://google.github.io/styleguide/shellguide.html

**Tags:** bash, shell-scripting, style-guide, code-quality, best-practices

### 3. ShellCheck

**Author:** Vidar Holen

Static analysis tool that flags quoting bugs, word-splitting errors, portability problems and misused constructs in shell scripts. Paste a script into the web version or run it locally; every warning links to a wiki page explaining the failure and the fix.

**Difficulty:** Beginner | **Language:** English | **Price:** Free

**Link:** https://www.shellcheck.net/

**Tags:** shell-scripting, bash, static-analysis, linting, code-quality

### 4. GNU Bash Reference Manual

**Author:** Chet Ramey and Brian Fox

The official manual for Bash 5.3, documenting shell syntax, expansions, redirections, builtins, variables, job control, line editing and history. Written by the maintainers, it is the authoritative statement of what each construct actually does.

**Difficulty:** Advanced | **Language:** English | **Price:** Free

**Link:** https://www.gnu.org/software/bash/manual/bash.html

**Tags:** bash, shell-scripting, reference, documentation, command-line

### 5. BashGuide (Greg's Wiki)

**Author:** Lhunath (Maarten Billemont) and GreyCat (Greg Wooledge)

The single best free structural path through Bash, and the explicit community replacement for the discredited TLDP Advanced Bash-Scripting Guide. Teaches correct habits (quoting, [[ ]], arrays) from the first page rather than retrofitting them. Community-maintained guide on Greg Wooledge's wiki covering commands, parameters, globbing, conditionals, arrays, redirection and traps. Its companions BashFAQ and BashPitfalls document the quoting and word-splitting mistakes that silently break most beginner scripts.

**Difficulty:** Beginner | **Language:** English | **Price:** Free

**Link:** https://mywiki.wooledge.org/BashGuide

**Tags:** bash, shell-scripting, quoting, command-line, best-practices

## Books

### 1. Classic Shell Scripting

**Author:** Arnold Robbins and Nelson H. F. Beebe

Robbins and Beebe on writing portable POSIX shell scripts, with substantial coverage of the surrounding toolset: grep, sed, awk, sort, find and xargs. Predates Bash 5 but remains the standard treatment of text-processing pipelines.

**Difficulty:** Advanced | **Language:** English | **Price:** Paid

**Link:** https://www.amazon.com/dp/0596005954?tag=edmonddante07-20

**Tags:** shell-scripting, posix, awk, sed, unix-tools, text-processing

### 2. Advanced Bash-Scripting Guide

**Author:** Mendel Cooper

Free book-length guide to Bash scripting by Mendel Cooper, moving from basic scripts through variables, quoting, loops, functions, arrays, regular expressions, I/O redirection and subshells, with hundreds of annotated example scripts. Readers learn to write and debug nontrivial shell programs.

**Difficulty:** Intermediate | **Language:** English | **Price:** Free

**Link:** https://www.tldp.org/LDP/abs/html/abs-guide.pdf

**Tags:** bash, shell-scripting, linux, unix-shell, automation

---

*This content is part of Dantes.io - Your Treasure Map to Knowledge*

*Curated by humans at Dantes.io. Personal study use welcome; republishing this curation requires permission (team@dantes.io).*

View this page online: https://dantes.io/subject/bash-shell-scripting