Work in progress: 82,651 of 181,233 sites checked so far, more every week · updated 2 Nov 2026Missing a blog? Tell us

Top all-time · #1378

A

Aaron Maxwell

Personal blog · redsymbol.net/articles · on HN as redsymbolprogramming

Aaron Maxwell's personal blog at redsymbol.net covers programming. Since 2009, 51 different Hacker News readers have linked it 62 times, most often “Use the Unofficial Bash Strict Mode (Unless You Love Debugging)”. No feed was found, so read it on the site itself.

No feed foundVisit the blog
62mentions?
5recommend?
51HN people?
2009–2026first – last linked?
Links on Hacker News per year · peak 8 in 2018

Too few sampled comments (29) to say how often HN recommends it.?

Why HN links it

Aaron Maxwell's bash articles, chiefly the 'Unofficial Bash Strict Mode' guide. HN readers cite it as a standard reference for safer shell scripts using set -euo pipefail and IFS settings.

Recommended for · 5 comments
Called 'a godsend' and 'terrific'; one commenter says it had the biggest impact on their bash scripts and another says they have had good results following it.

Summarised by Claude from a sample of 29 HN comments that link here. Each comment is marked recommending, critical or neutral (citing without judging); how this works.

The author on HN?

redsymbol · 1,474 karma · member since 2007

Aaron Maxwell Software engineer and media buyer/marketer Author of Powerful Python: https://www.amazon.com/dp/1098175700 Contact: amax@redsymbol.net

From their public HN profile, which links to this site.

Most-linked posts?

  1. Use the Unofficial Bash Strict Mode (Unless You Love Debugging)
    41 people · 46 mentions · first linked 2014-07-18
  2. How “Exit Traps” Can Make Bash Scripts More Robust and Reliable
    5 people · 5 mentions · first linked 2012-12-28
  3. Why I'm Coding in Python 3 (Hint: It's About Gratitude.)
    2 people · 2 mentions · first linked 2013-04-05

What Hacker News says?

  1. bcoughlan · 2022-10-27Recommends
    I've always had good results following "Unofficial Bash Strict Mode": http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Shell script best practices, from a decade of scripting things”
  2. Submitted Use the Unofficial Bash Strict Mode (Unless You Love Debugging) as a story · 180 points

    HN discussion
  3. Obligatory: http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Safe ways to do things in bash”
  4. Submitted How “Exit Traps” Can Make Bash Scripts More Robust and Reliable as a story · 158 points

    HN discussion
  5. The thing I wished I had learned earlier is "quick and dirty assertions". If you write lots of functions in Bash, you quickly end up getting tripped up by cases where an argument is omitted and the function does something totally batshit given the missing (empty string) argument. Now, the canonical way to handle this is to put validators on your input, (and make sure those validators don't crash with cryptic errors…

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Things I Wish I'd Known About Bash”
  6. Submitted Use the unofficial Bash strict mode as a story · 96 points

    HN discussion
  7. My take on the same topic: - use the unofficial strict mode: http://redsymbol.net/articles/unofficial-bash-strict-mode/ - use parameter substitutions like ${foo#prefix}, ${foo%suffix} instead of invoking sed/awk - process substitution instead of named pipes: <(), >() - know the difference between an inline group {} and a subshell () - use printf "%q" when passing variables to another shell (e.g. assembling a command…

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Things I Wish I'd Known About Bash”
  8. Submitted Crash course in applied functional programming as a story · 55 points

    HN discussion
  9. This is generally terrible advice. A better option is to 'set -e' and ensure that the bash script exits when there's a failure. Bash scripts can't be idempotent because they operate in an external environment that can't ever be. The better option is to just be extra safe. See: > http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “How to write idempotent Bash scripts”
  10. Submitted Bash Strict Mode (2014) as a story · 48 points

    HN discussion
  11. http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Moved ~/.local/share/steam. Ran steam. It deleted everything owned by user”
  12. Submitted Bash Strict Mode as a story · 13 points

    HN discussion
  13. related: http://redsymbol.net/articles/unofficial-bash-strict-mode

    Comment linking /articles/unofficial-bash-strict-mode

    on “Writing Safe Shell Scripts (2019)”
  14. Submitted Use Bash Strict Mode (Unless You Love Debugging) as a story · 10 points

    HN discussion
  15. i'm surprised it doesn't recommend using set -e /other flags. [ http://redsymbol.net/articles/unofficial-bash-strict-mode/ ] maybe it is not covered because it is not considered 'style' but i think those flags are some of the most important things you can set when writing a bash script. i guess if you are writing scripts that start other things, and then check their error codes it can be annoying because you have tu…

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Shell Style Guide”
  16. Submitted Use Bash Strict Mode (Unless You Love Debugging) as a story · 10 points

    HN discussion
  17. Not an expert on Nix, but it's not so much that Nix has problems (though I'm sure it does, my initial research suggested it's not quite there yet for Python packages) but that there other things you need to get right. For example: 1. Signal handling (only one bit of https://hynek.me/articles/docker-signals/ is Dockerfile specific, the rest still applies.) 2. Configuring servers to run correctly in Docker environment…

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Simple Dockerfile examples are often broken by default”
  18. Submitted Using Exit Traps In Bash as a story · 10 points

    HN discussion
  19. A better approach is to avoid writing bash scripts. They're just too dangerous, even with "strict mode" ( http://redsymbol.net/articles/unofficial-bash-strict-mode/ ). Better to use Python, or Ruby, or a Rust or Go executable.

    Comment linking /articles/unofficial-bash-strict-mode/

    on “How to write idempotent Bash scripts (2019)”
  20. Submitted Use bash strict mode (Unless you love debugging) as a story · 4 points

    HN discussion
  21. +1 This is where I’ve learned proper bash. People always compliment my bash skills, but the only thing I do is sticking to the wooledge wiki’s rules + using the unofficial bash strict mode ( http://redsymbol.net/articles/unofficial-bash-strict-mode/ ).

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Bash $* and $@ (2017)”
  22. Submitted “Exit Traps” Can Make Your Bash Scripts Way More Robust and Reliable as a story · 4 points

    HN discussion
  23. pferde · 2020-10-10Recommends
    Also known as "bash strict mode". It's a godsend if you're unlucky enough to have to deal with bash scripting. http://redsymbol.net/articles/unofficial-bash-strict-mode/ EDIT: The comic strip would be better in three rows of two panels - a row for each set flag.

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Bash Error Handling”
  24. Submitted Use Bash Strict Mode (Unless You Love Debugging) as a story · 4 points

    HN discussion
  25. Good idea -- here is an explanation: http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Compiling my own SPARC CPU inside a cheap FPGA”
  26. Submitted Unoffical Bash Strict Mode as a story · 4 points

    HN discussion
  27. The bash -e and -u options might have saved him here: http://redsymbol.net/articles/unofficial-bash-strict-mode/

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Man accidentally 'deletes his entire company' with one line of bad code”
  28. Submitted Use Bash Strict Mode (Unless You Love Debugging) as a story · 3 points

    HN discussion
  29. Also, "unofficial bash strict mode" is terrific, especially if you intend to distribute a script: http://redsymbol.net/articles/unofficial-bash-strict-mode/ set -euo pipefail IFS=$'\n\t' (You can always turn, for example, error checking back off for an individual portion of the script with `set +e`)

    Comment linking /articles/unofficial-bash-strict-mode/

    on “Replacing Dropbox in favor of DigitalOcean spaces”
  30. Submitted Unofficial Bash Strict Mode as a story · 3 points

    HN discussion

Search all of HN for redsymbol.net

Linked by the same people?