Created
May 16, 2015 18:42
-
-
Save intchloe/669cc2608647f6ab5794 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
unset IFS | |
for i in $(seq "$1") | |
do | |
time=$({ time curl -s -A "" -d $2 $3 >/dev/null; } |& grep real | cut -f2 | cut -c3- | tr -d 's') | |
tmp+=$time"+" | |
if [ "$i" -eq "$1" ] | |
then | |
echo "scale=5;""("${tmp%?}")/${1}" | bc | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment