1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
#!/bin/sh < list sort -R | while read -r url do file="$(echo "$url" | sed -e "s|.*/||")" if ! [ -f "$file" ] then curl -LO "$url" case "$file" in *.tar.*) tar xf "$file" ;; *) dir="${file%.*}" mkdir $dir cd $dir 7z e ../"$file" cd .. ;; esac fi done