Created
September 5, 2015 00:17
-
-
Save hollingberry/058aebb69a0791076d19 to your computer and use it in GitHub Desktop.
This file contains hidden or 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/sh | |
for line in `cat /dev/stdin | head -n -18 | tail -n +3` | |
do | |
# Create URL | |
url=http://users.humboldt.edu/$line/ | |
# Get HTTP status | |
status=`curl -sIL $url | head -1 | awk '{print $2}'` | |
# Get HTTP body | |
body=`curl -sL $url` | |
# Ignore 404s and other errors | |
if [ $status -ne 200 ]; then continue; fi | |
# Ignore boring defaults | |
if [[ $body =~ .*twoColLiqLtHdr.* ]]; then continue; fi | |
# Print URL | |
echo $url | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment