Leafnode Cheats

Note: all of these require a proper Bourne shell. Bsh, csh and tcsh will not work. Bash 2 and pdksh are tested, any ksh should do. ash, sh and zsh will probably also do, but are untested.

Maintenance

Watching and Cleaning interesting.groups

List all groups that are in interesting.groups, but not in groupinfo

Adjust spooldir to what your leafnode has compiled in.

spooldir=/var/spool/news/ ; \
cut -f1 -d" " $spooldir/leaf.node/groupinfo | sort >ln$$.1 ; \
ls -1 $spooldir/interesting.groups | sort >ln$$.2 ; \
comm -13 ln$$.[12] ; rm ln$$.[12]

Unsubscribe all groups that are in interesting.groups, but not in groupinfo

spooldir=/var/spool/news/ ; \
cut -f1 -d" " $spooldir/leaf.node/groupinfo | sort >ln$$.1 ; \
ls -1 $spooldir/interesting.groups | sort >ln$$.2 ; \
comm -13 ln$$.[12] \
| while read f ; do rm $spooldir/interesting.groups/$f ; done ; \
rm ln$$.[12]

Matthias Andree
Last modified: Sun Sep 2 14:05:57 CEST 2001