In larger bash scripts (which should be turned to Perl scripts, really) I always start with
set -eu
and put all code into a main() function, so that I can declare all variables with local. It's not as strict as strict, but it helps a lot.
In reply to Re^7: Summing numbers in a file
by choroba
in thread Summing numbers in a file
by pvfki
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |