Use quotation marks. Plentifully.
if [ "$ENROLSTAT" = Complete ]
(This is also an equal sign). My biggest problem in shell programming is always hidden spaces. This is one of the reasons why I write so much in Perl, and why, in Perl, I tell everyone on my team to avoid the shell when running external programs. There is so much power in the shell, with so many little things that can touch you, and I avoid them where possible. (And not where it is impossible).
source share