#!/usr/bin/perl # # Simple perl script to grab a random sig from a text file and stick it # in the output file you specify. Original code form Tracy Reed # (http://www.ultraviolet.org). # Be sure to change $sigs value, sigheader and the file written to. # Best use is to create a crontab entry to call this every 5 minutes # or whatever interval you prefer to have your sig changed. # The sig file has a line consisting of nothing but a - and a newline # To delimit different sigs. # srand; $sigs=`cat /path/to/signatures`; @sigs=split(/-\n/,$sigs); $thesig=splice(@sigs,rand @sigs,1); $sigheader="Your sig header here\n"; open(FILE,">/path/to/.signature"); print FILE "$sigheader"; print FILE "$thesig"; close(FILE);