X-Git-Url: https://git.xandkar.net/?a=blobdiff_plain;f=list;h=6309b9c6e32c7f338c50dd82d6a2bbc1a6407a8d;hb=8fff953bc3cb3a58e1115ed153b3cb7c4796e30d;hp=04d5d3cc7fa69fc0def2b039a74ab65e443e3247;hpb=0b43a166e37777a360fbbfd2043c2b1565e0cff3;p=khome.git diff --git a/list b/list index 04d5d3c..6309b9c 100755 --- a/list +++ b/list @@ -1,12 +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 }