🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #9892

Re: Cron-able news saver? (related question)

#9892
From: Steven King, Software Archaeolog...
Date: Thu, 07 Jul 1994 14:25
56 lines
3358 bytes
pejanes@undergrad.math.uwaterloo.ca (Peter Janes) publicly declared:
>I'm by no means a trn god, but I had trouble with the script as supplied,
>too.  (I was the original poster, BTW, and this was the script I mentioned.)
>It appears that the ^M doesn't work correctly on some versions of trn (no
>specifics, other than version 3.2 here).  If replaced with \n, it works fine
>when started interactively or backgrounded with & or ^Z (but still not from
>a cron).

And I'm the one who posted this particular 'trnkill' script.  It seems
there was an error on my part.  That "^M" wasn't really a control-M, but
the two characters "^" and "M".  Probably an artifact of cutting and
pasting at some point in the script's life.  I apologize.  I made the
correction Peter suggested and replaced the "^M" with the "\n" token.

I also apologize that the script didn't run the way I thought it would.
Even after this fix, Peter is exactly right.  It runs from the command
line, but doesn't run when invoked from cron.  I get "13499 Abort - core
dumped" when I try.

Wayne, if you're interested I can ship you the core or any other data
you'd like.  This is a Sparc running SunOS 4.3.1; the version of trn is:

    @(#)$Id: trn.c,v 3.0 1991/11/22 00:14:59 davison Trn $
    Version: 3.5 
    Send bug reports to davison@borland.com

For everyone else, here's the corrected version of 'trnkill', with the
"^M" replaced.

---=== Cut Here ===---  ---=== Cut Here ===---  ---=== Cut Here ===---
#!/bin/sh
# trnkill - shell script to apply trn KILL files in the background
# 14 Mar 89  created 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\n:n)^(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
---=== Cut Here ===---  ---=== Cut Here ===---  ---=== Cut Here ===---

-- 
----------------------------------------------<Steven King, king@cig.mot.com>--
2 + 2 = 5  for sufficiently large values of 2.
Technical Details
Message-ID: <2vh39b$res@delphinium.cig.mot.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!hookup!usc!elroy.jpl.nasa.gov!ncar!asuvax!pitstop.mcd.mot.com!mcdphx!schbbs!mothost!delphinium.cig.mot.com!wildebeest!king
References: <CsFw0r.MLo@undergrad.math.uwaterloo.ca> <2vc1nq$hl1@delphinium.cig.mot.com> <1994Jul6.195017.26518@kocrsv01.delcoelect.com> <CsJu1u.Ex4@undergrad.math.uwaterloo.ca>

Show Full Headers
Complete Article Headers
Message-ID: <2vh39b$res@delphinium.cig.mot.com>
Subject: Re: Cron-able news saver? (related question)
Date: Thu, 07 Jul 1994 14:25:47 +0000
From: king@wildebeest.cig.mot.com (Steven King, Software Archaeologist)
References: <CsFw0r.MLo@undergrad.math.uwaterloo.ca> <2vc1nq$hl1@delphinium.cig.mot.com> <1994Jul6.195017.26518@kocrsv01.delcoelect.com> <CsJu1u.Ex4@undergrad.math.uwaterloo.ca>
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!hookup!usc!elroy.jpl.nasa.gov!ncar!asuvax!pitstop.mcd.mot.com!mcdphx!schbbs!mothost!delphinium.cig.mot.com!wildebeest!king
Newsgroups: news.software.readers
Organization: Cellular Infrastructure Group, Motorola
Lines: 56
Reply-To: king@wildebeest.cig.mot.com
NNTP-Posting-Host: wildebeest.rtsg.mot.com