#! /bin/bash while true;do read -p "please input:" aexpr $a + 1 &> /dev/null if [ $? -eq 0 ] ;then echo "input is int."elseecho "input is char."fi if [ $a == 'q' ];then breakfi done