[急] linux shell if语句怎么写? 我要显示不在集合中的元素if [["$RESULT" -lt "$LIST"]]有没有 for not in 这个语法呢?谢谢

来源:学生作业帮助网 编辑:作业帮 时间:2024/05/04 17:07:04

[急] linux shell if语句怎么写? 我要显示不在集合中的元素if [["$RESULT" -lt "$LIST"]]有没有 for not in 这个语法呢?谢谢
[急] linux shell if语句怎么写? 我要显示不在集合中的元素
if [["$RESULT" -lt "$LIST"]]
有没有 for not in 这个语法呢?谢谢

[急] linux shell if语句怎么写? 我要显示不在集合中的元素if [["$RESULT" -lt "$LIST"]]有没有 for not in 这个语法呢?谢谢
read -p "请输入分数:" score
if [ $score -gt 60 -a $score -lt 70 ]; then
echo "合格"
fi
逻辑判断说明:
-gt (greater than,大于)
-lt (less than,小于)
-a (and,逻辑“与”关系)
注意 [ ] 里的空格