🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #33213

Re: slrn - executable .sigfile

#33213
From: Hubert Canon
Date: Tue, 29 Apr 1997 00:00
47 lines
1960 bytes
Le 27 Apr 1997 03:28:18 GMT,
   Jason Stokes <j.stokes@OUT-DAMNED-SPAM.bohm.anu.edu.au> ecrivait :
> In EXMH, I can make my .signature file generate a random signature by making
> it executable and putting a command in it, say "fortune", that generates
> some output.  EXMH executes the .signature file instead of reading it, and
> puts the standard output as the signature for the message.

If you are under unix, you can use fifos. I have a perl script that
create a file .signature, and each time you read this file, it execute
some program. :

#!/usr/local/bin/perl
$FIFO = '.signature';
$ENV{PATH} .= ":/etc:/usr/games";     # where your fortune program is
while (1) {
    unless (-p $FIFO) {
        unlink $FIFO;
        system('mknod', $FIFO, 'p')
            && die "can't mknod $FIFO: $!";
    }
    # next line blocks until there's a reader
    open (FIFO, "> $FIFO") || die "can't write $FIFO: $!";
    print FIFO "John Smith (smith\@host.org)\n", `fortune -s`;
    close FIFO;
    sleep 2;    # to avoid dup sigs
}



you just have to launch this program in background at startup, and you
have a different signature every time :

in your .login or .profile or .xinitrr :
make-signature &

and then :
cat .signature
cat .signature
cat .signature


-- 
Hubert Canon
canon@irisa.fr

Technical Details
Message-ID: <slrn5mbdci.fb.Hubert.Canon@guenievre.irisa.fr>
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
References: <5juh4i$sf0$1@clarion.carno.net.au>

Show Full Headers
Complete Article Headers
Message-ID: <slrn5mbdci.fb.Hubert.Canon@guenievre.irisa.fr>
Subject: Re: slrn - executable .sigfile
Date: Tue, 29 Apr 1997 00:00:00 +0000
From: Hubert.Canon@irisa.fr (Hubert Canon)
References: <5juh4i$sf0$1@clarion.carno.net.au>
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: 238112959
Distribution: world
Organization: Irisa, Rennes (FR)
Reply-To: Hubert.Canon@irisa.fr
Newsgroups: news.software.readers