Great Circle Associates List-Managers
(July 1994)
 

Indexed By Date: [Previous] [Next] Indexed By Thread: [Previous] [Next]

Subject: Re: Looking for useful shell scripts etc
From: Jerry Peek <jerry @ ora . com>
Date: Thu, 14 Jul 1994 09:37:16 -0700
To: Malcolm Jackson <cczmjj @ unicorn . ccc . nottingham . ac . uk>
Cc: list-managers @ GreatCircle . COM
In-reply-to: Message from Malcolm Jackson <cczmjj @ unicorn . ccc . nottingham . ac . uk> of "Thu, 14 Jul 1994 13:48:42 +0100." <199407141259 . FAA20282 @ mycroft . GreatCircle . COM>
Reply-to: jerry @ ora . com

I think there are other list-managers readers who use "forw -digest",
too, so I decided to reply to the list...

>   I use MH's `forw -digest...' to create a digest for my mailing-list twice
> a day. The digest is formatted to 80 characters which sometimes causes the
> odd character to over-wrap onto the next line. Occasionally the over-wrapped
> character is a `full-stop' (ya know, a ".") which causes some mailers to
> truncate the digest ...
>  Quite simply, all I'm looking for is a sed or awk script to read through
> the digest and remove any line that contains the single "."

A sed script to do that looks like:
	/^\.$/d
You can put that in a shell script named "dotfix" and invoke it from the
"What now?" prompt by typing "edit dotfix".  The script is:
	#!/bin/sh
	/bin/cp "$1" /tmp/fix$$
	/bin/sed '/^\.$/d' /tmp/fix$$ > "$1"
	/bin/rm -f /tmp/fix$$
	exit 0
You could add some bug proofing to handle things like a full /tmp, an
unwritable draft (in the $1 argument, etc.) but that's the basic idea.

A better solution might be to add a sendproc script that automatically
processes all your outgoing mail and deletes those lines; you wouldn't
have to do anything special.  If there's a copy of my Nutshell Handbook
"MH & xmh: E-mail for Users & Programmers" around your office somewhere,
look at the "mysend" script in Section 13.13.  You can also get "mysend"
from ftp.uu.net in /published/oreilly/nutshell/MHxmh/MHxmh2.tar.Z.
--
Jerry Peek; O'Reilly & Associates; Sebastopol, CA 95472 USA; jerry @
 ora .
 com
Info: gopher gopher.ora.com (or telnet, and login: gopher), or info @
 ora .
 com
Orders: (800)998-9938, +1 707-829-0515, fax +1 707-829-0104, or order @
 ora .
 com


Follow-Ups:
References:
Indexed By Date Previous: Looking for useful shell scripts etc
From: Malcolm Jackson <cczmjj @ unicorn . ccc . nottingham . ac . uk>
Next: Re: List Owners vs. System Administrators
From: mcb @ netcom . com (Michael C. Berch)
Indexed By Thread Previous: Looking for useful shell scripts etc
From: Malcolm Jackson <cczmjj @ unicorn . ccc . nottingham . ac . uk>
Next: Re: Looking for useful shell scripts etc
From: Michelle Dick <artemis @ rahul . net>

Google
 
Search Internet Search www.greatcircle.com