!/bin/bash
function check(){
local a="a" &>/dev/null && echo "integer" && return
printf "%d" "a|sed 's/^[+-]?0+//')" &>/dev/null && echo "integer" && return
printf "%f" "{#a} -eq 1 ] && echo "char" && return
echo "string"
}
check $1
function check(){
local a="a" &>/dev/null && echo "integer" && return
printf "%d" "a|sed 's/^[+-]?0+//')" &>/dev/null && echo "integer" && return
printf "%f" "{#a} -eq 1 ] && echo "char" && return
echo "string"
}
check $1