.TH "else" 1 "8 Feb 2007" "Version 1.22.3" "fish" \" -*- nroff -*- .ad l .nh .SH NAME else - execute command if a condition is not met .PP .SS "Synopsis" \fCif CONDITION; COMMANDS_TRUE...; [else; COMMANDS_FALSE...;] end\fP .SS "Description" \fCif\fP will execute the command CONDITION. If the condition's exit status is 0, the commands COMMANDS_TRUE will execute. If it is not 0 and \fCelse\fP is given, COMMANDS_FALSE will be executed. Hint: use \fC\fCbegin; ...; end\fP\fP for complex conditions. .SS "Example" The command \fCif test -f foo.txt; echo foo.txt exists; else; echo foo.txt does not exist; end\fP will print \fCfoo.txt exists\fP if the file foo.txt exists and is a regular file, otherwise it will print \fCfoo.txt does not exist\fP.