Article View: news.software.readers
Article #11881Re: TRN: Running it NON-interactively
From: Wayne Davison
Date: Wed, 12 Oct 1994 16:25
Date: Wed, 12 Oct 1994 16:25
37 lines
1971 bytes
1971 bytes
According to Michael Owings <mikey@waste.com>: > Can TRN be run non-interactively (besides using the -c > flag to check for news)? I would like to have it run > (from cron), process my kill file entries for selected > groups, and then exit. Run the "trnkill" script included below from cron and it will enter every subscribed group you have just long enough to run the kill file, and then exit. -- Wayne Davison davison@borland.com ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- #!/bin/sh # trnkill - shell script to apply trn KILL files in the background # 14 Mar 89 created for rn by Jim Olsen <olsen@XN.LL.MIT.EDU> # 10 Sep 93 modified for trn 3 (or 2) by Wayne Davison <davison@borland.com> # Options: -d debug mode -- you see all gory action as it happens. # Visit all newsgroups (if trn asks about anything else, just say no) export TRNINIT TRNMACRO RNMACRO TRNINIT='-q -s -T -t -x +X' TRNMACRO=/tmp/trnkill$$ # support for trn 2.x RNMACRO=$TRNMACRO trap 'rm -f $TRNMACRO; exit' 1 2 3 15 echo "z %(%m=[nf]?.q^J:n)^(z^)" > $TRNMACRO echo "^m ^(z^)" >> $TRNMACRO echo "^j ^(z^)" >> $TRNMACRO if test X$1 = X-d; then echo "z" | trn else echo "z" | trn >/dev/null 2>&1 fi rm -f $TRNMACRO exit 0 ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---
Technical Details
Message-ID:
<CxKIy3.5u4@borland.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!mhv.net!metro.atlanta.com!emory!gatech!concert!decwrl!borland.com!davisonReferences:
<37fhvf$4cb@oedipa.waste.com>Show Full Headers
Complete Article Headers
Message-ID: <CxKIy3.5u4@borland.com> Subject: Re: TRN: Running it NON-interactively Date: Wed, 12 Oct 1994 16:25:14 GMT From: davison@borland.com (Wayne Davison) References: <37fhvf$4cb@oedipa.waste.com> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!archive!mbox2nntp-news.software.readers.mbox.zip!bga.com!news.sprintlink.net!mhv.net!metro.atlanta.com!emory!gatech!concert!decwrl!borland.com!davison Newsgroups: news.software.readers Organization: Borland International Lines: 37