update shell to use new while syntax