Skip to content

Instantly share code, notes, and snippets.

@hollingberry
Created September 5, 2015 00:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hollingberry/058aebb69a0791076d19 to your computer and use it in GitHub Desktop.
Save hollingberry/058aebb69a0791076d19 to your computer and use it in GitHub Desktop.
#!/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