How to do a logical OR operation in shell scripting

前端 未结 8 2204
小蘑菇
小蘑菇 2020-11-27 08:55

I am trying to do a simple condition check, but it doesn\'t seem to work.

If $# is equal to 0 or is greater than 1 then say he

8条回答
  •  遥遥无期
    2020-11-27 09:47

    If a bash script

    If [[ $input -gt number  ||  $input  -lt number  ]]
    then 
        echo .........
    else
        echo .........
    
    fi
    
    exit
    

提交回复
热议问题