Shell中判断字符串是否为数字 方法1 a=1234; echo "$a"|[ -n "`sed -n '/^[0-9][0-9]*$/p'`" ] && echo string a is numbers