Bash Loop Through Array Backwards R