Whether shell string a-zA-Z starts with the letter

if [ `echo $file|grep ^[a-zA-Z]` ]; then
    echo YES
fi

 

Published 569 original articles · won praise 276 · views 490 000 +

Guess you like

Origin blog.csdn.net/Rong_Toa/article/details/104252884