News for hackers. Stuff that matters.
Re:Shell Script Best Practices, from a decade of scripting t... by ndsipa_pomu on Thursday October 27, 2022 @05:11AM (#33355092)
I agree. I make an effort to not change directory wherever possible and if a change is needed, do it in a subshell and just for the command that needs it (hardly any commands actually need it, anyway).

Edit: just had a quick look at your recommended link and spotted a "mistake" in 4.7 - using "read" without "-r" would get caught out by shellcheck.

Re:Shell Script Best Practices, from a decade of scripting t... by rgrau on Thursday October 27, 2022 @05:32AM (#33355246)
Fixed, thanks!