Accept a name for dl and include starter script file
[khome.git] / list
diff --git a/list b/list
index acfdde7..6309b9c 100755 (executable)
--- a/list
+++ b/list
@@ -1,11 +1,22 @@
 #! /usr/bin/awk -f
 
+BEGIN {
+    sep = sep ? sep : " "
+    end = end ? end : ""
+}
+
 ! /^\#/ && ! /^$/ {
     xs[$1]++
 }
-    
+
 END {
+    _sep = ""
     for (x in xs) {
-        printf("%s%s", sep, x, sep = " ")
+        if (xs[x] > 1) {
+            printf ">>> [WARNING] : '%s' was listed %d times.\n", x, xs[x] > "/dev/stderr"
+        }
+        printf("%s%s", _sep, x)
+        _sep = sep
     }
+    printf "%s", end
 }
This page took 0.029617 seconds and 4 git commands to generate.