1 2 3 4 5 6 7 8 9
#!/bin/sh [ -z "$1" ] && exit base="$(basename $1)" ext="${base##*.}" fname="/tmp/imgurl-$(date '+%s').$ext" setsid curl -sL "$1" > "$fname" && nsxiv -a "$fname" &