shell-IF判断

#!/bin/bash
echo "-----------------strat---------------"
read -p "Enter a number:" value;
if [[ $value -le 10 ]];then
echo "Enter the number is less than 10!";
fi

在上面的代码中需要注意的问题是:

if [[ $value -le 10 ]]这段代码大括号跟变量之间需要保持空格

原文地址:https://www.cnblogs.com/OliverQin/p/6020505.html