This will replace the start of the line with 'wget' and add the output file specification parameter at the end. To add the proper output name, we must use a loop to repeat the file name and revision number, and use the
-E flag to enable extended regular expressions.
for url in $(cat url.data)
do
file=$(echo $url | sed -E 's/(.*)?rev=([0-9]+)/\1-\2\.zip/')
echo "wget $url -O $file"
done
The sed command in the loop creates the desired output file name by extracting the file name and revision number from the URL.
See: