syntax error at line 1, near "$1 while"