#!/bin/bash# just an example of how you could handle your downloads# try some pattern matching on the uri to determine what we should do# Some sites block the default wget --user-agent..dest="$HOME/Downloads"que="$HOME/Downloads/.downloadque"url="$8"GET="wget --user-agent=Firefox"function processque {while [ `wc -l $que | awk '{print $1}'` -ge "1" ]do cd "$dest"; eval "$GET `head -1 $que`" echo `head -1 $que` sed -i 1d $quedoneecho "Downloadque is leeg"}#test "x$url" = "x" && { echo "Geen url opgegeven! Zal nu de downloadque behandelen! ($url)"; exit 1; }test "x$1" = "x" && { echo "Geen url opgegeven! Zal nu de downloadque behandelen! ($1)"; processque; exit 1; }test "x$8" != "x" && { echo "($8) wordt aan downloadque toegevoegd"; echo "$8" >> "$que"; exit 1; }test "x$1" != "x" && { echo "($1) wordt aan downloadque toegevoegd"; echo "$1" >> "$que"; exit 1; }# only changes the dir for the $get sub process#if echo "$url" | grep -E '.*\.torrent' >/dev/null;#then# ( cd "$dest"; eval "$GET" "$url")#else# ( cd "$dest"; eval "$GET" "$url")#fi