🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nntp
Article #5764

Why "cat cmd | trn" works but "trn < cmd" doesn't?

#5764
From: Destiny Software
Date: Mon, 18 Mar 1996 00:00
38 lines
1731 bytes
Hi,
I'm trying to setup an automated news grabber, and what I did was putting 
some trn commands in a texxt file and pipe it to trn.  The text file 
looks something like:

  g news.software.nntp
  +/pipe/a:s found.article
  etc...

It should instruct trn to goto news.software.nntp group and search for 
articles containing the word pipe, and save them in 
~/News/found.article.  However, I found out that "cat cmd | trn" works 
but "trn < cmd" doesn't.  As far as I can tell, they should accomplish 
the same thing, and the "cat..." version just has a little more 
overhead.  In the "trn < cmd" case, it appear that the first character in 
"cmd" is being sent to trn in an endless loop.  I've tried:

   trn < cmd > trn.output &

and wait for a few seconds, and then kill the process.  The contents of 
trn.output looks something like this:

  [the first few lines are regular trn output]
  ...stat. about subscribed groups...
  ...read now?[+ynq]
  g
  g
  g
  g
  ...

And the 'g' lines continues...  When I tried to load trn.output into vi 
or pico, they complained about long lines.  What's going on?

recon


Technical Details
Message-ID: <4ij85m$dv1@fountain.mindlink.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail

Show Full Headers
Complete Article Headers
Message-ID: <4ij85m$dv1@fountain.mindlink.net>
Subject: Why "cat cmd | trn" works but "trn < cmd" doesn't?
Date: Mon, 18 Mar 1996 00:00:00 +0000
From: a04029@giant.mindlink.net (Destiny Software)
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nntp.mbox.zip!not-for-mail
X-Deja-AN: 142987650
Distribution: inet
Organization: MIND LINK! Communications Corp., Vancouver, BC, Canada.
Newsgroups: news.software.nntp