#!/bin/sh urlget="wcat -cb" # runge special #urlget="wget -O - -nv" # should be std on linux if [ "$DISPLAY" = "" ]; then DISPLAY=:0.0 export DISPLAY fi tmp="/tmp/dilbert.$$.gif" latest=`$urlget http://www.unitedmedia.com/comics/dilbert/ | \ perl -e 'while (<>) { next unless /SRC=/; if ( /IMG\s+SRC="([^"]*)"[^>]*Today.s\s+(Dilbert\s+)?Comic/i ) { print $1, "\n"; last; } }'` if echo "$latest" | grep '^http://' >/dev/null ; then url="$latest" else url="http://www.unitedmedia.com$latest" fi echo "$url" $urlget "$url" > $tmp (xv -name DILBERT -geometry +0+0 $tmp; rm -f $tmp) & exit 0 # the line we grep looks like: #