Article View: news.software.readers
Article #11901Re: TRN: Running it NON-interactively
From: lvirden
Date: Thu, 13 Oct 1994 19:43
Date: Thu, 13 Oct 1994 19:43
53 lines
2443 bytes
2443 bytes
Here is an example from a shell script that I run: #!/bin/ksh # 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) # Assumes either default KILL file location or that user has specified a # KILLLOCAL and KILLGLOBAL environment variable. export PATH=/home/lwv26/bin/sun4:$PATH export TRNINIT TRNMACRO RNMACRO debug="" special=1 while [ $# ] ; do case "$1" in -d ) debug=-d ; shift ;; -n ) special="" ; shift ;; * ) break ;; esac done TRNINIT='-q -s -T -t -x +X' if [ -n "$special" ] ; then # Kill files are in one directory if [ x"$KILLLOCAL" = x"" -a x"$KILLGLOBAL" = x"" ] ; then TRNINIT='-q -s -T -t -x +X -EKILLLOCAL="%p/Kill/%C" -EKILLGLOBAL="%p/Kill/global"' fi fi TRNMACRO=/tmp/trnkill$$ # support for trn 2.x RNMACRO=$TRNMACRO trap 'rm -f $TRNMACRO; exit' 1 2 3 15 echo "z %(%m=[nf]?.q^M:n)^(z^)" > $TRNMACRO echo "^m ^(z^)" >> $TRNMACRO echo "^j ^(z^)" >> $TRNMACRO if test X$debug = X-d; then echo "z" | trn else echo "z" | trn >/dev/null 2>&1 fi rm -f $TRNMACRO echo "$0: completed" exit 0 -- :s Great net resources sought... :s Larry W. Virden INET: lvirden@cas.org :s <URL:http://www.mps.ohio-state.edu/cgi-bin/hpp?lvirden_sig.html> The task of an educator should be to irrigate the desert not clear the forest.
Technical Details
Message-ID:
<1994Oct13.194339.17165@chemabs.uucp>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!howland.reston.ans.net!gatech!purdue!lerc.nasa.gov!kira.cc.uakron.edu!malgudi.oar.net!chemabs!lwv26References:
<37fhvf$4cb@oedipa.waste.com>Show Full Headers
Complete Article Headers
Message-ID: <1994Oct13.194339.17165@chemabs.uucp> Subject: Re: TRN: Running it NON-interactively Date: Thu, 13 Oct 1994 19:43:39 GMT From: lvirden@cas.org 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!howland.reston.ans.net!gatech!purdue!lerc.nasa.gov!kira.cc.uakron.edu!malgudi.oar.net!chemabs!lwv26 Newsgroups: news.software.readers Content-Type: text/plain; charset=US-ASCII Sender: lwv26@chemabs.uucp (Larry W. Virden) Reply-To: lvirden@cas.org Content-Transfer-Encoding: 7BIT Organization: Nedriv Software and Shoe Shiners, Uninc. Mime-Version: 1.0 Lines: 53