Nested for loop using the same variable in bash are bad (tm)