#!/bin/sh [ -z "$1" ] && echo 'usage: pind ' && exit 1 read url < <(curl -Ls "$1" | pup 'img attr{src}') curl -LO --no-clobber $url && echo "$url downloaded"