Warn if list item appears more than once
authorSiraaj Khandkar <siraaj@khandkar.net>
Wed, 4 Sep 2019 23:07:21 +0000 (19:07 -0400)
committerSiraaj Khandkar <siraaj@khandkar.net>
Wed, 4 Sep 2019 23:07:21 +0000 (19:07 -0400)
list

diff --git a/list b/list
index 04d5d3c..2c518e8 100755 (executable)
--- a/list
+++ b/list
@@ -6,6 +6,9 @@
 
 END {
     for (x in xs) {
+        if (xs[x] > 1) {
+            printf ">>> [WARNING] : '%s' was listed %d times.\n", x, xs[x] > "/dev/stderr"
+        }
         printf("%s%s", sep, x)
         sep = " "
     }
This page took 0.018157 seconds and 4 git commands to generate.