Update test.sh

fixed input loop