Commit | Line | Data |
---|---|---|
1 | #! /usr/bin/awk -f | |
2 | ||
3 | BEGIN { | |
4 | sep = sep ? sep : " " | |
5 | end = end ? end : "" | |
6 | } | |
7 | ||
8 | ! /^\#/ && ! /^$/ { | |
9 | xs[$1]++ | |
10 | } | |
11 | ||
12 | END { | |
13 | _sep = "" | |
14 | for (x in xs) { | |
15 | if (xs[x] > 1) { | |
16 | printf ">>> [WARNING] : '%s' was listed %d times.\n", x, xs[x] > "/dev/stderr" | |
17 | } | |
18 | printf("%s%s", _sep, x) | |
19 | _sep = sep | |
20 | } | |
21 | printf "%s", end | |
22 | } |