Is it possible to grab the last line of wget?
wget -O /dev/null http://website.com/file.jpg 2>&1 |sed -n '\%/dev/null%!d;s/.*(//;s/).*//p'
On my system, the final output line is empty, otherwise the sed
addressing would be simpler. This is on Ubuntu out of the box; if your sed
is different, you may need to adapt the script slightly.
(I tried with grep -o '(.*)'
at first, but there is other text in parentheses earlier in the output from wget
.)