4 ms·Bash has local variables1 points by dorfsmay 10y agodorfsmay 10y agoBy default all variables are global, and had not realised that you can specify "local" to make variables inside a function, local.