Spellcheck Interview Question in Bash