Advertisement
Guest User

Untitled

a guest
May 21st, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 0.30 KB | None | 0 0
  1. #!/usr/bin/env bash
  2.  
  3. url=$1
  4. tmpfile=/tmp/_statuscount
  5. echo -n "">$tmpfile
  6.  
  7. for i in {1..100}
  8. do
  9.     response=$(curl --write-out %{http_code} --silent --output /dev/null $url)
  10.     echo $response>>$tmpfile
  11. done
  12.  
  13. grep -oE '[a-z0-9]+' $tmpfile | sort | uniq -c | sort -r | awk '{print $2" "$1}'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement