turbonss/contrib/remove_dupe_gids.awk
2022-07-04 07:00:05 +03:00

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;
}