Java While Loop Through An Array Bash Script Example Of If Else