Re: Signature

Ivan Popovski <[email protected]>
Newsgroups gmane.network.slrn.user
Message-ID <[email protected]>
On Fri, Feb 22, 2008 at 12:38:37PM +0100, Ivan Popovski wrote:
> 

Eh and i can give you example of bash script for generating random
signatures (what i m using atm). Put interpret (.slrnrc) of that slang
script i already sent here. Also set:

set signature ".sigexec|"

Here is small .sigexec that i m using atm :)

#!/bin/bash

y=$[ $RANDOM % $(tail -1 .sig) ]
sed -n /^"$y"$/,/^"$[ $y+1 ]"$/p .sig | egrep -v -e '^[[:digit:]]+$'

This should work on newer bashes :)

Anyway .sig should containing your signatures in form:

0
Signature1 line1
Signature1 line2
1
Signature2 line1
Signature2 line2
2
Signature3 line1
Signature3 line2
3

Delimiters between signatures are numbers :) file starts with num 0 and
end with number of signetures :)

P.S. egrep regexp can give you problems if you have signature containing only
numbers :))) Feel free to improve and use all stuff i sent here. Hope this helps
someone :)


-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.