logoalt Hacker News

dietr1chyesterday at 5:42 AM1 replyview on HN

The problem is that I forgot (if I ever knew) bash.

I can write fish, scripting or interactively on my shell without thinking too hard about the syntax, but when scripting in bash I require an example or using my snippets to be sure I'm not shooting myself on the foot or writing something that bash will reject right away.


Replies

lillecarlyesterday at 6:03 AM

The trick is to use "shellcheck" on your bash scripts, it's an overly anal linter that'll keep you sharp, and it's 2026, everyone can script bash with AI :)

But yeah the syntax with [[, if fi, while stmt; do; done, "$@", case esac, "${!VAR}" and others makes me long for the day fish shell gets "euo pipefail" mode so I can stop writing bash or || true :)

show 1 reply