我想使用 bash 做什么:
> if true; then echo y; else echo n; fi
y
> if false; then echo y; else echo n; fi
n
> if false || true; then echo y; else echo n; fi
y
现在尝试鱼:
> if true; echo y; else; echo n; end
y
> if false; echo y; else; echo n; end
n
# Here 'or true' are just two arguments for false
> if false or true; echo y; else; echo n; end
n
# Here 'or true;' is a command inside the if
> if false; or true; echo y; else; echo n; end
n
# Can't use command substitution instead of a command
> if (false; or true); echo y; else; echo n; end
fish: Illegal command name “(false; or true)”
我怎样才能有两个条件if
?