首页 / 百科 / 内容详情 num1=100num2=100if test $[num1] -eq $[num2]thenecho '两个数相等!'elseecho '两个数不相等!'fi输出结果:两个数相等! 2022-04-25 7次阅读 num1 Num2 100 num1=100num2=100if test $[num1] -eq $[num2]thenecho '两个数相等!'elseecho '两个数不相等!'fi输出结果:两个数相等! A.正确B.错误正确答案:正确 ;!binbashint=1while(( $int=5 ))doecho $intlet int++done运行脚本,输出:12345 顺序输出字符串中的字符:for str in 'This is a string'doecho $strdone输出结果:This is a string 猜你喜欢 num1=$[2*3]num2=$[1+5]if test $[num1] -eq $[num2]thenecho '两个数字相等!'elseecho '两个数字不相等!'fi输出结果为:连个 令Num1=1且Num2=2,则下列表达式为真。The expression is true or false if Num1=1 and Num2=2.(Num1==1) OR (Num2==2) AND (Num1==Num2) 令Num1=1且Num2=2,则下列表达式为真。The expression is true or false if Num1=1 and Num2=2.((Num1==1) OR (Num2==2)) AND (Num1==Num2) 令Num1=1且Num2=2,则下列表达式为真。The expression is true or false if Num1=1 and Num2=2.NOT(Num1==1) AND NOT (Num2==2) 令Num1=1且Num2=2,则下列表达式为真。The expression is true or false if Num1=1 and Num2=2.NOT(Num1==1) OR NOT (Num2==2)