Bash Script Loop Through Array Javascript Duplicates Cleaner For Windows