se metti il then a capo non serve il ";"

codice:
if[ ... ];
then
diventa

codice:
if[ ... ]
then