Bash Script Check If Variable Contains Duplicate