#!/bin/sh # Download and display X-Image images : ${VIEWER:=fbi} # Create temporary directory for images dir=/tmp/$RANDOM mkdir $dir grep '^X-Image: ' | sed 's/^X-Image: //' | while read url do curl "$url" > $dir/$RANDOM done # Display images and delete them afterwards $VIEWER $dir/* < /dev/tty rm -r $dir