2 # We need a file to look at.
4 echo Usage: `basename $0` uidgid
8 # The format of the file is (currently)
9 for infile in "$@" ; do
10 uidlist=`tail -n +2 "$infile" | awk '{print $2}' | grep -v '?' | grep -v -e - | sort -nu`
11 gidlist=`tail -n +2 "$infile" | awk '{print $3}' | grep -v '?' | grep -v -e - | sort -nu`
12 for uid in $uidlist ; do
13 if test `tail -n +2 "$infile" | awk '{print $2}' | grep '^'"$uid"'$' | wc -l` -ne 1 ; then
14 echo Duplicate UID: $uid
18 for gid in $gidlist ; do
19 if test `tail -n +2 "$infile" | awk '{print $3}' | grep '^'"$gid"'$' | wc -l` -ne 1 ; then
20 echo Duplicate GID: $gid