Yes, you also need to use `local` on loop control variables

BASH

Hi there! this will be a quick-short blog post about Bash, specifically about one of the coolest bash builtins, local.

I wanted to clarify a few things about this shell builting that, I feel most of the Bash developers don´t pay attention to, they seem to ignore control variables from the equation and only use the builtin with explicit variables. I saw two cases…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store