Syntax validation for "if, else if and else".
Link to manual: https://doc.redox-os.org/ion-manual/control/01-conditionals.html
Frist example:
if test "foo" = $foo
echo "Found foo"
else if matches $foo '[A-Ma-m]\w+'
echo "we found a word that starts with A-M"
if not matches $foo '[A]'
echo "The word doesn't start with A"
else
echo "The word starts with 'A'"
end
else
echo "Incompatible word found"
end
Second example:
if test $foo = "foo" && test $bar = "bar"
echo "foobar was found"
else
echo "either foo or bar was not found"
end