Skip to content

Instantly share code, notes, and snippets.

@meandavejustice
Created July 15, 2014 06:09
Show Gist options
  • Save meandavejustice/be52a319fd3e1ed1d0eb to your computer and use it in GitHub Desktop.
Save meandavejustice/be52a319fd3e1ed1d0eb to your computer and use it in GitHub Desktop.
use responsibly...
#!/bin/bash
if [ ! -t 0 ]; then
user=/dev/stdin
elif [ $1 ]; then
user=$1
else
echo "Usage: $1 [username <string>] $2 [-m msg <string>]" 1>&2; exit 1;
fi
if [ $2 ]; then
msg=$2
else
msg="you_out_the_squad" # your username here
fi
if [ $3 ]; then
i=$3
else
i=1
fi
x=1
while [ $x -le $i ]
do
curl -X POST http://yofor.me/$user/$msg
echo "Welcome $x times"
sleep 1
x=$(( $x + 1 ))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment