In addition to shell best practices:
- Prefer
${var,,}
and${var^^}
overtr
for changing case. - Prefer
${var//from/to}
oversed
for simple string replacements. - Prefer
[[
overtest
or[
. - Prefer process substitution over a pipe in
while read
loops. - Use
((
orlet
, not$((
when you don't need the result