1
Fork 0
turbonss/contrib/remove_dupe_gids.awk

13 lines
249 B
Awk
Executable File

#!/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;
}