wget http://pics.sitename.com/images/191211/mxKL17DdgUhcr.jpg 45439 (44K) [image/jpeg] Saving to: «mxKL17DdgUhcr.jpg» 100%[===================================================================================================>] 45 439 --.-K/s в 0s 2011-12-20 12:25:33 (388 MB/s) - «mxKL17DdgUhcr.jpg» saved [45439/45439] url=http://pics.sitename.com/images/191211/mxKL17DdgUhcr.jpg filename=$(basename "$url") wget "$url" wget -O myfile.html http://www.example.com/ url='http://pics.sitename.com/images/191211/mxKL17DdgUhcr.jpg' file=`basename "$url"` wget "$url" -O "$file" ~ $ URL='http://pics.sitename.com/images/191211/mxKL17DdgUhcr.jpg' ~ $ echo ${URL##*/} mxKL17DdgUhcr.jpg ~ $ wget $URL -O ${URL##*/} --18:34:26-- http://pics.sitename.com/images/191211/mxKL17DdgUhcr.jpg => `mxKL17DdgUhcr.jpg' wget --server-response -q -O - "https://very.long/url/here" 2>&1 | grep "Content-Disposition:" | tail -1 | awk 'match($0, /filename=(.+)/, f){ print f[1] }' ) echo ${url##*/} echo -n "Give me the name of file in http://pics.sitename.com/images/191211/ :" read $string sudo wget http://pics.sitename.com/images/191211/$string ;;