|
|
1.1 ! root 1: case $CONFIG in ! 2: '') . config.sh ;; ! 3: esac ! 4: echo "Extracting newsgroups (with variable substitutions)" ! 5: $spitshell >newsgroups <<!GROK!THIS! ! 6: $startsh ! 7: # $Header: newsgroups.SH,v 4.3 85/05/01 11:43:27 lwall Exp $ ! 8: # ! 9: # $Log: newsgroups.SH,v $ ! 10: # Revision 4.3 85/05/01 11:43:27 lwall ! 11: # Baseline for release with 4.3bsd. ! 12: # ! 13: ! 14: export PATH || (echo "OOPS, this isn't sh. Desperation time. I will feed myself to sh."; sh \$0; kill \$\$) ! 15: ! 16: : syntax: newsgroups [pattern] [pipeflag] ! 17: ! 18: : System Dependencies ! 19: ! 20: : You might want to change pager to a "make column" program if you have one. ! 21: : On the other hand, if your kernel does paging, cat would probably do. ! 22: pager="${pager-/usr/ucb/more}" ! 23: active="/tmp/active.\$\$" ! 24: ! 25: : End of system dependencies, hopefully ! 26: ! 27: $rnlib/getactive \$active ! 28: ! 29: if $test \$# -ge 2 ; then ! 30: pager=$cat ! 31: else ! 32: $echo "Completely unsubscribed newsgroups:" ! 33: fi ! 34: ! 35: dotdir=\${DOTDIR-\${HOME-\$LOGDIR}} ! 36: ! 37: : Throwing .newsrc into the pot twice is a lovely hack to prevent ! 38: : bogus newsgroups from showing up as unsubscribed. ! 39: ! 40: $cat \$dotdir/.newsrc \$dotdir/.newsrc \$active | \\ ! 41: $sed -e '/^options/d' \\ ! 42: -e '/^[ ]/d' \\ ! 43: -e '/^control/d' \\ ! 44: -e '/^to\./d' \\ ! 45: -e 's/^\([^ !:]*\)[ !:].*\$/\1/' \\ ! 46: -e "/.*\$1/p" \\ ! 47: -e 'd' | \\ ! 48: $sort | $uniq -u | \$pager ! 49: if $test \$# -ge 2 ; then ! 50: exit ! 51: fi ! 52: $echo $n "[Type return to continue] $c" ! 53: read tmp ! 54: $echo "" ! 55: $echo "Unsubscribed but mentioned in .newsrc:" ! 56: $sed < \$dotdir/.newsrc \\ ! 57: -e "/\$1.*!/"'s/^\([^!]*\)!.*\$/\1/p' \\ ! 58: -e 'd' | \\ ! 59: $sort | \$pager ! 60: rm \$active ! 61: !GROK!THIS! ! 62: $eunicefix newsgroups ! 63: chmod 755 newsgroups
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.