.TH "for" 1 "8 Feb 2007" "Version 1.22.3" "fish" \" -*- nroff -*- .ad l .nh .SH NAME for - perform a set of commands multiple times. .PP .SS "Synopsis" \fCfor VARNAME in [VALUES...]; COMMANDS...; end\fP .SS "Description" \fCfor\fP is a loop construct. It will perform the commands specified by COMMANDS multiple times. Each time the environment variable specified by VARNAME is assigned a new value from VALUES. If VALUES is empty, COMMANDS will not be executed at all. .SS "Example" The command .PP \fCfor i in foo bar baz; echo $i; end\fP .PP would output: .PP .PP .nf foo bar baz .fi .PP