> instead if you dont want to work with a real tab character. [:blank:] is
> exactly space and tab.

These 3 methods are working:
echo -e "\t 123" | grep -Eq "^[ |       ]*123" && echo "real_tab"
echo -e "\t 123" | grep -Eq "^[ |`echo -e "\t"`]*123" && echo "echo \\t"
echo -e "\t 123" | grep -Eq "^[[:blank:]]*123" && echo "blank"

_____
Tux

Reply via email to