shell if,linuxshell编程if语句内判断参数有哪些呢
一、在linux下shell脚本中if中用到or怎么写
shell脚本中的or和C语言类似,也是用||(两个竖杠)表示or逻辑。
二、linuxshell编程if语句内判断参数有哪些呢
(($num1!=$num2))里面的是算术表达式用(($num1-$num2))或者[[$num1!=$num2]]
三、shell if else判断两数相等
if[$x-eq$y]------------if[$x-eq$y]----------[]两边都要有空格echo"inputtwonumber:"readxreadyif[$x-eq$y]thenecho"equal!"elseecho"notequal"fi