replaceAfriend script to annoy

#!/bin/bash
# AUTHOR -
# M@ - M@sprackle.org GPG Public Key ID:  0x4ADEA413
# NAME -
# replaceAfriend
# SYNOPSIS -
# ./replaceAfriend
# DESCRIPTION -
# I have a shirt from thinkgeek.com that says
# "Go away or I will replace you with a very small shell script"
# so I wanted to make that a true statement.  I opted to pick random
# lines in a few ways.
# http://www.thinkgeek.com/tshirts-apparel/unisex/frustrations/374d/
# REVISIONS -
# Only one published at this time.
# LIMITATIONS -
# You'll need to break this because it loops forever.

# Here is the location of your file that has your friends favorite quotes
FRIENDFILE='/home/username/.myfriends'

# What's the Max interval(in seconds) you want to go without interuption
INTERVAL='600'

function annoyingloop {
perl -le 'sleep rand ${INTERVAL}'
sed -n $((1+$RANDOM%`wc -l ${FRIENDFILE} | cut -f 1 -d ' '`))p ${FRIENDFILE} | festival --tts
annoyingloop
}

annoyingloop

Content of .myfriends file

hello friend how are you doing today, what's for lunch
Hey can I ask you a quick question
what time do you wake up?
Hey I just thought I would come over.  Oh you look busy, what do you want to do for lunch?
Are you going to drink the rest of this coffee?
Quick question for you..
Leave a comment

0 Comments.

Leave a Reply


[ Ctrl + Enter ]