Bash Loop Through Array Powershell Substring