#!/bin/sh
# URLs are values of the tags "lthumb" and "photo"
# If they have a non-200 status code they will be printed out
xmlstarlet sel -t -v '//lthumb|//photo' file.xml\
    | grep -v '^$'\
    | xargs -L1 curl -I --silent --output /dev/null -w '%{http_code} %{url_effective}\n'\
    | grep -v ^200
