#!/bin/bash if [ -z "$1" -o ! -d "$1" ]; then echo "Usage: $0 []" 1>&2 exit 1 fi top="${1}" shift source "${top}/etc/settings.sh" tmp="$(mktemp -d)" cd "${tmp}" export LANG=C export LC_ALL=C DATE=$(date -d"$daysago days ago" +"%d %b %Y") URL=$(wget "http://extrafabulouscomics.com/feed/" -O - | sed -n -re "/pubDate.+$DATE/ { n; n; n; n; s/.+(http:\/\/extrafabulouscomics.com\/comic\/[0-9]+\/).+/\1/p; q }") if [ -z $URL ]; then echo "Nichts gefunden für $DATE" exit 0 fi echo URL $URL gefunden URL=$(wget -O - "$URL" | sed -nre 's#.*