From 5cafd8ba2d28f5d71235dd3221913695463fe44c Mon Sep 17 00:00:00 2001 From: RealStickman Date: Sat, 25 Jun 2022 11:42:44 +0200 Subject: [PATCH] (Grav GitSync) Automatic Commit from RealStickman --- pages/04.other/15.fish/default.en.md | 37 ++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pages/04.other/15.fish/default.en.md diff --git a/pages/04.other/15.fish/default.en.md b/pages/04.other/15.fish/default.en.md new file mode 100644 index 0000000..8001c4a --- /dev/null +++ b/pages/04.other/15.fish/default.en.md @@ -0,0 +1,37 @@ +--- +title: Fish +--- + +[toc] +## For loop +### Iterating over number sequence +`for i in (seq 1 10); echo $i; end` +Output: +``` +1 +2 +3 +4 +5 +6 +7 +8 +9 +10 +``` + +If you want all numbers to be padded to equal lengths use the `-w` flag with `seq` +`for i in (seq -w 1 10); echo $i; end` +Output: +``` +01 +02 +03 +04 +05 +06 +07 +08 +09 +10 +``` \ No newline at end of file