Convert Powershell To Bash Script For Loops