<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"><channel>
<title>Learn Bash</title>
<link>https://learn-bash.net/</link>
<description>Free Bash and shell tutorials, plus how to write scripts and agent hooks that fail safely.</description>
<lastBuildDate>Sun, 06 Sep 2026 03:07:12 GMT</lastBuildDate>
<item><title>Hello, World!</title><link>https://learn-bash.net/hello-world/</link><guid>https://learn-bash.net/hello-world/</guid><description>The tutorial discusses shell programming in general with focus on Bash (“Bourne Again Shell”) shell as the main shell interpreter.</description></item>
<item><title>Shell scripts as agent guardrails</title><link>https://learn-bash.net/ai/hooks-and-guardrails/</link><guid>https://learn-bash.net/ai/hooks-and-guardrails/</guid><description>Your agent runs more shell than anything else, and shell is the one place a mistake is not recoverable. Here is how to write the scripts that keep it honest.</description></item>
<item><title>The shell mistakes language models actually make</title><link>https://learn-bash.net/review/failure-modes/</link><guid>https://learn-bash.net/review/failure-modes/</guid><description>Generated shell is usually correct on the happy path and dangerous on every other one. Almost all of it is caught by one tool.</description></item>
<item><title>Variables</title><link>https://learn-bash.net/variables/</link><guid>https://learn-bash.net/variables/</guid><description>Shell variables are created once they are assigned a value. A variable can contain a number, a character or a string of characters.</description></item>
<item><title>Passing Arguments to the Script</title><link>https://learn-bash.net/passing-arguments-to-the-script/</link><guid>https://learn-bash.net/passing-arguments-to-the-script/</guid><description>Arguments can be passed to the script when it is executed, by writing them as a space-delimited list following the script file name.</description></item>
<item><title>What your script depends on, when there is no package manager</title><link>https://learn-bash.net/review/dependencies/</link><guid>https://learn-bash.net/review/dependencies/</guid><description>A shell script's dependencies are every external command it calls, every flag it assumes, and every installer it pipes into a shell. None of that is declared anywhere.</description></item>
<item><title>Writing an AGENTS.md for shell-heavy projects</title><link>https://learn-bash.net/ai/agents-md/</link><guid>https://learn-bash.net/ai/agents-md/</guid><description>The shortest useful instructions file on this network — four lines of script header, a shellcheck rule, and one sentence about when to stop writing shell at all.</description></item>
<item><title>Arrays</title><link>https://learn-bash.net/arrays/</link><guid>https://learn-bash.net/arrays/</guid><description>An array can hold several values under one name. Array naming is the same as variables naming.</description></item>
<item><title>Security review checklist for generated shell scripts</title><link>https://learn-bash.net/review/security/</link><guid>https://learn-bash.net/review/security/</guid><description>Shell has no sandbox, no type system and no undo. Every variable is a potential injection point and every script runs with your full privileges.</description></item>
<item><title>Tracking what your coding agent costs you</title><link>https://learn-bash.net/ai/tokenomics/</link><guid>https://learn-bash.net/ai/tokenomics/</guid><description>Your agent already writes a complete record of every session to disk. Twenty lines of shell turns it into a spend report, and one hook keeps it honest.</description></item>
<item><title>Basic Operators</title><link>https://learn-bash.net/basic-operators/</link><guid>https://learn-bash.net/basic-operators/</guid><description>Arithmetic Operators Simple arithmetics on variables can be done using the arithmetic expression: $((expression)) The basic operators are: a + b addition (a plus b) a - b substraction (a minus b) a b multiplication (a times b) a / b division (integer) (a divided by b) a % b modulo (the integer remainder of a divided by b) a b exponentiation (a to the power of b)</description></item>
<item><title>The performance traps in generated shell scripts</title><link>https://learn-bash.net/review/performance/</link><guid>https://learn-bash.net/review/performance/</guid><description>Shell performance is almost entirely about how many processes you start. Generated scripts start a great many, and the fix is usually to delete code rather than add it.</description></item>
<item><title>Basic String Operations</title><link>https://learn-bash.net/basic-string-operations/</link><guid>https://learn-bash.net/basic-string-operations/</guid><description>The shell allows some common string operations which can be very useful for script writing.</description></item>
<item><title>Decision Making</title><link>https://learn-bash.net/decision-making/</link><guid>https://learn-bash.net/decision-making/</guid><description>As in popular programming languages, the shell also supports logical decision making.</description></item>
<item><title>Loops</title><link>https://learn-bash.net/loops/</link><guid>https://learn-bash.net/loops/</guid><description>For each pass through the loop, arg takes on the value of each successive value in the list. Then the command(s) are executed.</description></item>
<item><title>Array-Comparison</title><link>https://learn-bash.net/array-comparison/</link><guid>https://learn-bash.net/array-comparison/</guid><description>Comparison of arrays Shell can handle arrays An array is a variable containing multiple values. Any variable may be used as an array.</description></item>
<item><title>Shell Functions</title><link>https://learn-bash.net/shell-functions/</link><guid>https://learn-bash.net/shell-functions/</guid><description>Like other programming languages, the shell may have functions. A function is a subroutine that implements a set of commands and operations.</description></item>
<item><title>Case Statements</title><link>https://learn-bash.net/case-statements/</link><guid>https://learn-bash.net/case-statements/</guid><description>Pattern matching on a string — cleaner than a chain of if/elif, and the backbone of every argument parser and dispatch table in shell.</description></item>
<item><title>Special Variables</title><link>https://learn-bash.net/special-variables/</link><guid>https://learn-bash.net/special-variables/</guid><description>In last tutorial about shell function, you use “$1” represent the first argument passed to functionA.</description></item>
<item><title>Bash trap command</title><link>https://learn-bash.net/bash-trap-command/</link><guid>https://learn-bash.net/bash-trap-command/</guid><description>It often comes the situations that you want to catch a special signal/interruption/user input in your script to prevent the unpredictables.</description></item>
<item><title>Input Parameter Parsing</title><link>https://learn-bash.net/input-parameter-parsing/</link><guid>https://learn-bash.net/input-parameter-parsing/</guid><description>Turning $@ into a usable set of options: manual loops, getopts, long flags, and the --dry-run habit that makes a script safe to run once.</description></item>
<item><title>File Testing</title><link>https://learn-bash.net/file-testing/</link><guid>https://learn-bash.net/file-testing/</guid><description>Often you will want to do some file tests on the file system you are running. In this case, shell will provide you with several useful commands to achieve it.</description></item>
<item><title>Pipelines</title><link>https://learn-bash.net/pipelines/</link><guid>https://learn-bash.net/pipelines/</guid><description>Pipelines, often called pipes, is a way to chain commands and connect output from one command to the input of the next.</description></item>
<item><title>Process Substitution</title><link>https://learn-bash.net/process-substitution/</link><guid>https://learn-bash.net/process-substitution/</guid><description>In the previous section we’ve seen how to chain output of one command to the next one.</description></item>
<item><title>Regular Expressions</title><link>https://learn-bash.net/regular-expressions/</link><guid>https://learn-bash.net/regular-expressions/</guid><description>Bash has a regex operator built in, and it is better than piping to grep for most jobs — once you know the two quoting rules that trip everyone up.</description></item>
<item><title>Special Commands: sed, awk, grep, sort</title><link>https://learn-bash.net/special-commands-sed-awk-grep-sort/</link><guid>https://learn-bash.net/special-commands-sed-awk-grep-sort/</guid><description>The four tools that do most of the work in most shell scripts, and the small subset of each that is worth memorising.</description></item>
<item><title>Redirection and Here Documents</title><link>https://learn-bash.net/here-documents-and-redirection/</link><guid>https://learn-bash.net/here-documents-and-redirection/</guid><description>Where output goes, where input comes from, and how to embed a block of text in a script without fighting quotes.</description></item>
</channel></rss>