home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / hackers / 1977 < prev    next >
Encoding:
Text File  |  1993-01-25  |  2.5 KB  |  61 lines

  1. Newsgroups: alt.hackers
  2. Path: sparky!uunet!zaphod.mps.ohio-state.edu!news.acns.nwu.edu!nucsrl!ddsw1!gagme!gagme!pv
  3. From: pv@gagme.chi.il.us (Paul Vader)
  4. Subject: Batch rn
  5. Message-ID: <1993Jan24.220603.18068@gagme.chi.il.us>
  6. Originator: pv@gagme
  7. Lines: 48
  8. Sender: pv@gagme.chi.il.us (Paul Vader)
  9. Organization: Inline Software Creations
  10. Date: Sun, 24 Jan 1993 22:06:03 GMT
  11. Approved: That remains to be seen
  12.  
  13. Rob J. Nauta Writes:
  14. >You GOT to be kidding... If you want to automatically save articles, use
  15. >'readnews'. It comes with Bnews. it's old, slow, primitive, but for this it
  16. >works.
  17.  
  18. There's one good reason to use rn instead, and it's a biggie. KILL FILES. If
  19. you run rn in batch, you can build big and complex kill files, and not have
  20. to wait for them to execute online. That said, try this script to run rn in
  21. batch (I haven't used it in quite some time, so it might not be quite right.
  22. My sysadmin developed a batch set of newsreading tools at my suggestion a
  23. year ago when he wanted to practice nntp programming, but that's another
  24. story):
  25.  
  26. echo "Starting news extraction process..."
  27. echo "z %(%m=n?=: )">batchrn
  28. TERM=dumb
  29. RNINIT='-s -T -t'
  30. RNMACRO=$PWD/batchrn
  31. export RNMACRO RNINIT TERM
  32. yes 'z' | rn > newsfile
  33. echo "News File creation completed. Cleaning up..."
  34. rm batchrn
  35. echo "Done."
  36.  
  37. This has a few problems:
  38. 1. If you run out of space while the extraction is running, It just stops
  39.    dead. Cleaning up your .newsrc can be messy. Your're best off immediately
  40.    copying .oldnewsrc to .newsrc and starting over someplace else with more
  41.    space.
  42. 2. For some reason I wanted to see indexes before the messages. You might
  43.    want to take this out of the macro, but I'm leaving it as an exercise
  44.    for the Reader because I don't remember the syntax.
  45. 3. I could never quite get it to work under cron. I use "at" instead, and
  46.    imbed an at command at the end of the script to reschedule for the next
  47.    day (If you do this, add a date to the newsfile filename).
  48. 4. You see everything that happens in the session, because it's just
  49.    pressing the spacebar (except at the newsgroup selection prompt, where it
  50.    types "="). This leads to some ugliness in the extract, especially the
  51.    "---More---" prompt right after the header.
  52. 5. It's almost as exciting to watch as grass growing, and chews CPU like
  53.    calculating the millionth digit of pi.
  54.  
  55. Enjoy! PV
  56.  
  57. P.S. Enough with the IP ports already! Try "more /etc/services" or RTFM.
  58. -- 
  59. Paul Vader            systems analyst, hell's cavenewt, rollerblader,
  60. pv@gagme.chi.il.us    FOAF, smartass liberal democrat
  61.