explaingit

bobbyiliev/introduction-to-bash-scripting

5,807HTMLAudience · developerComplexity · 1/5LicenseSetup · easy

TLDR

A free, open-source ebook teaching Bash scripting from the basics to practical examples like log parsing, API calls, and automating tasks on remote servers.

Mindmap

mindmap
  root((bash-scripting-book))
    What it covers
      Variables and loops
      Functions and debugging
      Remote server scripts
    Formats
      Markdown on GitHub
      PDF dark and light
      ePub for e-readers
    Use Cases
      Task automation
      Log file parsing
      API calls in shell
    Audience
      Linux beginners
      System administrators
      Developers on macOS
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Learn to write Bash scripts that automate repetitive Linux tasks like file management and log parsing.

USE CASE 2

Follow the companion YouTube crash course while reading the ebook chapters on GitHub for free.

USE CASE 3

Contribute a new chapter or fix an error via a standard GitHub pull request.

USE CASE 4

Download the ebook as PDF or ePub to read offline on an e-reader or tablet.

Tech stack

BashHTMLMarkdown

Getting it running

Difficulty · easy Time to first run · 5min

No install needed, read chapters directly on GitHub or download as PDF/ePub, only requires a Linux or macOS terminal to run examples.

Open license, free to read, share, and contribute to under open-source terms.

In plain English

This repository is a free, open-source ebook called Introduction to Bash Scripting. It teaches the basics of writing Bash scripts, which are small programs that run in a Linux or macOS terminal to automate repetitive tasks. The book is aimed at developers, system administrators, and anyone who works with Linux and wants to stop doing the same manual steps over and over. The content is organized into about 24 chapters. The first 13 chapters build foundational knowledge: how Bash scripts are structured, how to use variables, how to accept input from a user, how to write loops and conditionals, how to create functions, and how to debug scripts. The remaining chapters show practical examples, including writing scripts that run on multiple remote servers, parsing log files from web servers, working with JSON data, calling web APIs, generating passwords, and sending emails. You can download the book as a PDF in a dark or light theme, or as an ePub file for reading on an e-reader. Each chapter is also available as a Markdown file in the repository, so you can read it directly on GitHub without downloading anything. The author, Bobby Iliev, also produced a short video crash course covering the first twelve chapters, available as a YouTube playlist. The ebook has a companion website as well. The project accepts community contributions. If you spot an error or want to add a chapter, the repository follows a standard open-source pull request workflow. The book is licensed under an open license, and the source files are written in Markdown.

Copy-paste prompts

Prompt 1
Using the bash scripting concepts in this ebook, write a script that reads a web server log file and counts the top 10 most requested URLs.
Prompt 2
Based on chapter examples, write a Bash script that SSHs into multiple remote servers and checks disk usage on each.
Prompt 3
How do I write a Bash function that accepts arguments, validates them, and exits with an error code if they're missing?
Prompt 4
Write a Bash script that calls a public JSON API, parses the response, and prints specific fields using jq.
Prompt 5
Show me a Bash script template with proper error handling using set -euo pipefail and a trap for cleanup.
Open on GitHub → Explain another repo

← bobbyiliev on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.