/usr/lib/news/control/docheckgroups is in inn 1:1.7.2q-44+b2.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121  | #! /bin/bash
##  $Revision: 1.7 $
##  Script to execute checkgroups text; results to stdout.
##  =()<. @<_PATH_SHELLVARS>@>()=
. /usr/lib/news/innshellvars
T=${TMPDIR}
cat /dev/null >${T}/$$out
##  Copy the article without headers, append local newsgroups.
cat >${T}/$$msg
test -f ${LOCALGROUPS} && cat ${LOCALGROUPS} >>${T}/$$msg
##  Get the top-level newsgroup names from the message and turn it into
##  an egrep pattern.
PATS=`${SED} <${T}/$$msg \
	-e 's/[ 	].*//' -e 's/\..*//' \
	-e 's/^!//' -e '/^$/d' \
	-e 's/^/^/' -e 's/$/[. 	]/' \
    | sort -u \
    | (tr '\012' '|' ; echo '' )\
    | ${SED} -e 's/|$//'`
${EGREP} "${PATS}" ${ACTIVE} | ${SED} 's/ .*//' | sort >${T}/$$active
${EGREP} "${PATS}" ${T}/$$msg | ${SED} 's/[ 	].*//' | sort >${T}/$$newsgrps
comm -13 ${T}/$$active ${T}/$$newsgrps >${T}/$$missing
comm -23 ${T}/$$active ${T}/$$newsgrps >${T}/$$remove
${EGREP} "${PATS}" ${ACTIVE} | ${SED} -n '/ m$/s/ .*//p' | sort >${T}/$$amod.all
${EGREP} "${PATS}" ${T}/$$msg |
${SED} -n '/(Moderated)$/s/[ 	].*//p' | sort >${T}/$$ng.mod
comm -12 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.mod
comm -23 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.unmod
cat ${T}/$$add.mod ${T}/$$add.unmod >>${T}/$$add
comm -23 ${T}/$$amod.all ${T}/$$remove >${T}/$$amod
comm -13 ${T}/$$ng.mod ${T}/$$amod >${T}/$$ismod
comm -23 ${T}/$$ng.mod ${T}/$$amod >${T}/$$nm.all
comm -23 ${T}/$$nm.all ${T}/$$add >${T}/$$notmod
if [ -s ${T}/$$remove ] ; then
    (
	echo "# The following newsgroups are non-standard."
	${SED} "s/^/#	/" ${T}/$$remove
	echo "# You can remove them by executing the commands:"
	for i in `cat ${T}/$$remove` ; do
	    echo "	${NEWSBIN}/ctlinnd rmgroup $i"
	    ${EGREP} "^$i	" ${NEWSGROUPS} >>${T}/$$ngdel
	done
	echo ''
    ) >>${T}/$$out
fi
if [ -s ${T}/$$add ] ; then
    (
	echo "# The following newsgroups were missing and should be added."
	${SED} "s/^/#	/" ${T}/$$add
	echo "# You can do this by executing the command(s):"
	for i in `cat ${T}/$$add.unmod` ; do
	    echo "	${NEWSBIN}/ctlinnd newgroup $i y ${FROM}"
	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngadd
	done
	for i in `cat ${T}/$$add.mod` ; do
	    echo "	${NEWSBIN}/ctlinnd newgroup $i m ${FROM}"
	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngadd
	done
	echo ''
    ) >>${T}/$$out
fi
if [ -s ${T}/$$ismod ] ; then
    (
	echo "# The following groups are incorrectly marked as moderated:"
	${SED} "s/^/#	/" ${T}/$$ismod
	echo "# You can correct this by executing the following:"
	for i in `cat ${T}/$$ismod` ; do
	    echo "	${NEWSBIN}/ctlinnd changegroup $i y"
	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngchng
	done
	echo ''
    ) >>${T}/$$out
fi
if [ -s ${T}/$$notmod ] ; then
    (
	echo "# The following groups are incorrectly marked as unmoderated:"
	${SED} "s/^/#	/" ${T}/$$notmod
	echo "# You can correct this by executing the following:"
	for i in `cat ${T}/$$notmod` ;do
	    echo "	${NEWSBIN}/ctlinnd changegroup $i m"
	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngchng
	done
	echo ''
    ) >>${T}/$$out
fi
test -s ${T}/$$out && {
    cat ${T}/$$out
    echo 'exit # so you can feed this message into the shell'
    echo "# And remember to update ${NEWSGROUPS}."
    test -s ${T}/$$ngdel && {
	echo "# Remove these lines:"
	${SED} "s/^/#	/" ${T}/$$ngdel
	echo ''
    }
    test -s ${T}/$$ngadd && {
	echo "# Add these lines:"
	${SED} "s/^/#   /" ${T}/$$ngadd
	echo ''
    }
    test -s ${T}/$$ngchng && {
	echo "# Change these lines:"
	${SED} "s/^/#   /" ${T}/$$ngchng
	echo ''
    }
}
rm -f ${T}/$$*
 |