Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on May 12th, 2012  |  syntax: None  |  size: 0.20 KB  |  hits: 14  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #!/bin/bash
  2.  
  3. # from http://www.hilarymason.com/blog/bash-get-http-response-codes-for-a-list-of-urls/
  4.  
  5. while read line
  6. do
  7.     echo $(curl --write-out %{http_code} --silent --output /dev/null $line)
  8. done <$1