1
Fork 0
turbonss/contrib/group-dupegids.awk

13 lines
249 B
Awk
Raw Normal View History

2022-07-04 07:00:05 +03:00
#!/usr/bin/awk -f
#
# Remove groups that have duplicate gids. The first group wins.
BEGIN{ FS=":" }
{
if ($3 in gids) {
print "duplicate gid="$3" name="$1", ignoring" > "/dev/stderr";
next;
}
gids[$3]=$0;
print $0;
}