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