Bash Substring Check