【发布时间】:2014-06-25 21:25:35
【问题描述】:
我想知道在编写 shell 脚本时是否可以在 if 语句中包含两个以上的语句?
username1="BOSS1"
username2="BOSS2"
password1="1234"
password2="4321"
if(($username == $username1)) && (($password == password1)) ||
(($username == $username2)) && (($password == password2)) ; then
这不起作用。但是有没有办法让它发挥作用?
谢谢!
【问题讨论】:
标签: shell if-statement conditional account