If you are trying to execute a while or for loop then you are not ending the statement within with a ;: while [...]; do command; done;
;
while [...]; do command; done;