📜  bash 正则表达式 if 条件 - Shell-Bash 代码示例

📅  最后修改于: 2022-03-11 14:51:52.603000             🧑  作者: Mango

代码示例1
Use following structure:
if [[ $digit =~ [0-9] ]]; then //run if a digit included in $digit string
    echo "$digit is a digit"
else
    echo "oops"
fi