Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 433 Bytes

repeat-a-command-x-times.md

File metadata and controls

27 lines (20 loc) · 433 Bytes

Repeat a Command x times

The Fish Shell has a for loop construct you can use.

Example:

for i in foo bar baz; echo $i; end

# would output:
foo
bar
baz

If you want to repeat a command, you can use the GNU seq util:

for i in (seq 5); echo $i; end

# would output:
1
2
3
4
5