Article View: news.software.readers
Article #38879Re: How to automagically edit postings?
From: Urko Lusa
Date: Wed, 18 Feb 1998 00:00
Date: Wed, 18 Feb 1998 00:00
39 lines
1485 bytes
1485 bytes
Julien Michielsen <jjm@beuk.xs4all.nl> wrote:
>Always after making a posting I must go through the proces of
>removing the lines "NNTP-Posting-Host ..." and "Xref ...".
>Writing scripts is not my strongest point, and I wonder how
>to put this recurrent procedure into a script.
I use the following script as a filter:
#!/usr/bin/perl
#
# Quitar el NNTP-Posting-Host y el Xref
#
$comparar = 1;
while (<STDIN>) {
$linea = $_;
if ($linea eq "\n") { $comparar = 0; } # se acabaron las cabeceras
if ($comparar) {
if (!(substr($linea,0,19) eq "NNTP-Posting-Host: " or
substr($linea,0,6) eq "Xref: " or
substr($linea,0,8) eq "Sender: ")) {
$mensaje .= $linea ;
}
}
else {
$mensaje .= $linea ;
}
}
print $mensaje;
--
Urko Lusa <ulusa@lacueva.ddns.org> (2:343/143.30@fidonet.org)
Technical Details
Message-ID:
<slrn6emdms.32t.ulusa@lacueva.ddns.org>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mailReferences:
<6cbopb$101$1@beuk.xs4all.nl>Show Full Headers
Complete Article Headers
Message-ID: <slrn6emdms.32t.ulusa@lacueva.ddns.org> Subject: Re: How to automagically edit postings? Date: Wed, 18 Feb 1998 00:00:00 +0000 From: ulusa@lacueva.ddns.org (Urko Lusa) References: <6cbopb$101$1@beuk.xs4all.nl> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail X-Deja-AN: 326645496 Mail-Copies-To: never X-Random-False-Address: psp@thffh.gvhdohs.uk Organization: No Newsgroups: news.software.readers