aboutsummaryrefslogtreecommitdiff
path: root/bin
diff options
context:
space:
mode:
authorTom Ryder <tom@sanctum.geek.nz>2017-04-22 17:19:14 +1200
committerTom Ryder <tom@sanctum.geek.nz>2017-04-22 17:19:14 +1200
commit1a5427174d4493ddfb3f700fdeba60d67b5fb944 (patch)
tree18cbaf2ec6dc163b53e886988e142b4d50a06c97 /bin
parentStreamline csmw(1df) a bit (diff)
downloaddotfiles-1a5427174d4493ddfb3f700fdeba60d67b5fb944.tar.gz
dotfiles-1a5427174d4493ddfb3f700fdeba60d67b5fb944.zip
Restore explicit iteration to csmw(1df)
Turns out the for...in construct doesn't specify an order in POSIX
Diffstat (limited to 'bin')
-rw-r--r--bin/csmw.awk2
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/csmw.awk b/bin/csmw.awk
index 05481305..4479d8f8 100644
--- a/bin/csmw.awk
+++ b/bin/csmw.awk
@@ -5,7 +5,7 @@
}
END {
if (wc > 2)
- for (i in ws)
+ for (i = 1; i <= wc; i++)
printf (i < wc) ? "%s, " : "and %s\n", ws[i]
else if (wc == 2)
printf "%s and %s\n", ws[1], ws[2]