Submission timeline
2007–2026One slot for every year since HN launched. Height is that year's peak points; orange marks a 100+ point or 50+ comment breakout. Select a bar to open its strongest thread.
First comments on top threads
HN comment orderI consider shellcheck absolutely essential if you're writing even a single line of Bash. I also start all my scripts with this "unofficial bash strict mode" and DIR= shortcut: #!/usr/bin/env bash ### Bash Environment Setup # http://redsymbol.net/articles/unofficial-bash-strict-mode/ # https://www.gnu.org/software/bash/manual/html_node/The-Set-Builtin.html # set -o xtrace set -o errexit set -o errtrace set -o nounset set -o pipefail IFS=$'\n' DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" I have more…
If your bash script is not trivial, and target machines have python, it's probably better to use sh: https://amoffat.github.io/sh/
It's the problem of nested DSLs (sed, tr, globing, bash's own control commands etc): you need to quote (escape) each DSL's meta-characters like crazy. It's a scary, horrific nightmare. Sure, you can learn all the intricacies, but what a waste of your cognition! There must be a way to do it with clean abstractions (assuming the unrealistic liberty to redesign all unix commands). But... I have a suspicion that the horror is intrinsic to the problem, and bash strikes a…
This sounds more like a case of “know what the things in your pipeline do, if it’s odd/abnormal” than “avoid -o pipefail”.
The first top-level comment from each of the four biggest threads, in HN’s own order. Excerpts are shortened; open a comment for full context.
- Breakout years
- 3
- Total points
- 589
- Total comments
- 207
100+ points or 50+ comments
reference only — not used in Hall rules or ranking
reference only — not used in Hall rules or ranking
Every submission
| Date | Title as submitted | By | Points | Comments |
|---|---|---|---|---|
| 2009-10-08 | Common Bash Pitfalls | dunk010 | 60 | 25 |
| 2014-10-10 | Bash pitfalls | general_failure | 2 | 0 |
| 2015-08-16 | Bash PitfallsFirst breakout | monort | 114 | 38 |
| 2019-01-06 | Bash Pitfalls | aaaaaaaaaab | 2 | 0 |
| 2020-09-07 | BashPitfalls | praveenscience | 2 | 0 |
| 2020-09-07 | Bash PitfallsHall induction · Best thread | aaron-santos | 288 | 111 |
| 2022-02-15 | Bash PitfallsLatest 20+ point return | pujjad | 106 | 32 |
| 2024-04-04 | Avoid "set -o pipefail" in bash | rom1v | 3 | 1 |
| 2024-07-04 | BashPitfalls – Greg's Wiki | whereistimbo | 5 | 0 |
| 2026-01-30 | Bash Pitfalls | Tikrong | 2 | 0 |
| 2026-05-11 | Bash Pitfalls - Greg's Wiki | dr_girlfriend | 5 | 0 |
