X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: f996b,8303dd7d2b170534,start X-Google-Attributes: gidf996b,public X-Google-Thread: fd588,8303dd7d2b170534,start X-Google-Attributes: gidfd588,public X-Google-Thread: 110f55,8303dd7d2b170534,start X-Google-Attributes: gid110f55,public X-Google-Thread: fbb9d,8303dd7d2b170534,start X-Google-Attributes: gidfbb9d,public From: Heidi Subject: Software: Perl Script, Random Signatures. Date: 1995/04/19 Message-ID: <3n301h$oh5@gagme.wwa.com>#1/1 X-Deja-AN: 101250426 approved: boba@wwa.com sender: boba@gagme.wwa.com organization: University of Dublin, Trinity College newsgroups: alt.ascii-art.animation,rec.arts.ascii,alt.ascii-art,alt.binaries.pictures.ascii Right, I've had so many requests for this one, I decided to post it as well. There are some notes missing at the bottom, which I will try to fill in as best I can:) Hope ye's all like it now... -----------------------[Cut Here]------------------------- #!/usr/local/bin/perl ####### # Randomizes your sig by copying a random sig file # from $HOME/sigs/ into $HOME/.signature # # be sure to change $home to your home directory path # and to change the @files line if you use a different path structure # # the file defined in $base will be put into the sig file, # then the random sig will be appended to it. # if you want to use this feature, be sure to uncomment the `cat base` line ####### $home = "/users/u3/lbedford"; # this line defines the users home dir #$base = "$home/randsigbase"; # this defines where the base file is srand(time|$$); # this makes random numbers happen @files = <$home/randsigs/*>; # this is the path to the sigs dir $this = $files[rand(@files)]; # this picks a random file from the # sigs dir (see also (3) below) #`cat $base > $home/.signature`; # see (1) below `cat $this > $home/.signature`; # see (2) below -----------------[Stop Here]--------------------------- Right, notes First of all, change the directory in the first line to whatever is relevant for your Unix installation... Ask your sys admin if you're not sure. Second, change the $home=... line to point to your own home directory. Thirdly, make sure you create a randsigs directory off your home directory, do this by typing 'mkdir randsigs'. lastly, the two points I cut off before. (1) To make the script add a random ending to a constant signature, take the # out from the beginning of this line, and change the '>' to '>>' in the next line. This makes the script take the file 'randsigbase', copy that to your signature, and append on a random ending. (2) I think I covered this in point (1), basically, to get a random ending, change the '>' to '>>'. Have fun. \ oo | Try me for dinner, I even wag my tail \____|\mm | if you're nice to me, and like my jokes!!! //_//\ \_\ | /K-9/ \/_/ | /___/_____\ | ----------- |