X-Git-Url: https://git.xandkar.net/?p=khome.git;a=blobdiff_plain;f=list;h=2c518e8fabe5d4d5e3a3eda0858a901f0a0168b9;hp=04d5d3cc7fa69fc0def2b039a74ab65e443e3247;hb=HEAD;hpb=0b43a166e37777a360fbbfd2043c2b1565e0cff3 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 }