摘自:http://blog.51cto.com/lynnteng0/804520

describe="it's a describe by yourself"
 
if echo "$describe" | grep -q '^[a-zA-Z0-9]\+$'; then
    echo "ok"
else
    echo "invalid"
fi

  

describe="it's a describe by yourself"
 
if echo "$describe" | grep -q '[^a-zA-Z0-9]'; then
echo "invalid"
fi

  

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-30
  • 2021-08-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案