⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 docheckgroups

📁 早期freebsd实现
💻
字号:
#! /bin/sh##  $Revision: 1.4 $##  Script to execute checkgroups text; results to stdout.##  =()<. @<_PATH_SHELLVARS>@>()=. /var/spool/news/data/innshellvarsT=${TMPDIR}cat /dev/null >${T}/$$out##  Copy the article without headers, append local newsgroups.cat >${T}/$$msgtest -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}/$$newsgrpscomm -13 ${T}/$$active ${T}/$$newsgrps >${T}/$$missingcomm -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.modcomm -12 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.modcomm -23 ${T}/$$missing ${T}/$$ng.mod >${T}/$$add.unmodcat ${T}/$$add.mod ${T}/$$add.unmod >>${T}/$$addcomm -23 ${T}/$$amod.all ${T}/$$remove >${T}/$$amodcomm -13 ${T}/$$ng.mod ${T}/$$amod >${T}/$$ismodcomm -23 ${T}/$$ng.mod ${T}/$$amod >${T}/$$nm.allcomm -23 ${T}/$$nm.all ${T}/$$add >${T}/$$notmodif [ -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 "	ctlinnd rmgroup $i"	    ${EGREP} "^$i	" ${NEWSGROUPS} >>${T}/$$ngdel	done	echo ''    ) >>${T}/$$outfiif [ -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 "	ctlinnd newgroup $i y ${FROM}"	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngadd	done	for i in `cat ${T}/$$add.mod` ; do	    echo "	ctlinnd newgroup $i m ${FROM}"	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngadd	done	echo ''    ) >>${T}/$$outfiif [ -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 "	ctlinnd changegroup $i y"	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngchng	done	echo ''    ) >>${T}/$$outfiif [ -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 "	ctlinnd changegroup $i m"	    ${EGREP} "^$i	" ${T}/$$msg >>${T}/$$ngchng	done	echo ''    ) >>${T}/$$outfitest -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}/$$*

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -