Counter increment in Bash loop not working ... Variables in a subshell are not available outside the ...
stackoverflow.com