How to Check, Lint, Format, and Test a Bash Script
How to check syntax, lint, format, and test Bash scripts with bash -n, ShellCheck, shfmt, and Bats, including the exact flags for each tool.

58 articles · since 2006
All the Tips & Tricks you ever needed to improve your shell scripting skills.
What are you trying to do?
How to check syntax, lint, format, and test Bash scripts with bash -n, ShellCheck, shfmt, and Bats, including the exact flags for each tool.
What common Bash errors mean and how to fix them: command not found, permission denied, bad substitution, ambiguous redirect, and more.
Learn how to do math in PowerShell, from the basic arithmetic operators to the .NET Math class. Covers integer and floating-point division, exponents and square roots, rounding, precision, random numbers, and summing a collection with Measure-Object.
How to convert between CIDR prefixes and netmasks, and calculate network, broadcast, and usable host ranges with ipcalc, sipcalc, python3, and Bash.
Learn how to do math arithmetic with integer and floating-point in Bash. Includes addition, subtraction, division, multiplication, and also floating-point precision.
Exploring the power of GNU bash character classes for efficient pattern matching in regular expressions, with an example script to generate an ASCII table.