🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.nn
Article #8166

Re: nn-->elm scripts

#8166
From: max
Date: Fri, 15 Nov 1996 00:00
64 lines
1913 bytes
wb8foz@netcom.com (David Lesher) writes:

>I managed to lose my nn-->elm mail script that someone
>gave me years ago. It was better than the 1994 one I see 
>in the FAQ.

>Has anyone else written a script to spawn elm from the 'm' and 'r'
>keys of nn?

I use, which has some problems with the latest elm code so I am back to
elm2.4pl25:


#! /bin/sh
#
# nn_elm
#
# 07 Aug 91             V1.0
#
# Massage a mail message from nn into a form that elm can use
# (c) 1991 Phil Kernick  Wizard Software
#
# 10 Nov 94		V1.1	Escape quotes in subject -- Dave Wolfe

eval `nawk '
BEGIN {

  FS = ":";
  dq = sprintf("%c", 34);
  bs = sprintf("%c", 92);

  headers = 0;
  to = "";
  subject = "";
}

/^.*: / {

  headers++;
  if($1 == "To")
    to = dq substr($0, 5) dq;
  if($1 == "Subject") {
    subject = substr($0, 10);
    gsub(/\"/, bs dq, subject);
    subject = dq subject dq
  }
}

/^$/ {

    printf("tail +%d %s | elm --s %s %s > /dev/null\n", headers+2, mail, subject, to);
    exit;
}' mail=$1 $1`

exit $?
-- 
Max Heffler, Technology Manager                     max@ns.coral-energy.com
Web: http://www.coral-energy.com/~mheffler (Listen to my songs)
  ___________________________________________________
  / // /// // /// // /// // /// // /// // /// // ///
 ---------------------------------------------------

Technical Details
Message-ID: <mheffler.848069845@ariel>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail
References: <wb8fozE0vvqy.GDy@netcom.com>

Show Full Headers
Complete Article Headers
Message-ID: <mheffler.848069845@ariel>
Subject: Re: nn-->elm scripts
Date: Fri, 15 Nov 1996 00:00:00 +0000
From: mheffler@ns.coral-energy.com (max@ariel)
References: <wb8fozE0vvqy.GDy@netcom.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.nn.mbox.zip!not-for-mail
X-Deja-AN: 196661315
Organization: Coral Energy
Keywords: mail elm nn
Newsgroups: news.software.nn