What I want to do using bash:
> if true; then echo y; else echo n; fiy> if false; then echo y; else echo n; fin> if false || true; then echo y; else echo n; fiy
Now trying with fish:
> if true; echo y; else; echo n; endy> if false; echo y; else; echo n; endn# 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; endfish: Illegal command name “(false; or true)”
How can I have two conditions in an if
?