#!/bin/bash
clear
echo Downloading $1
echo
filename=$2
output=$3 
echo $filename
wget --progress=dot "$1" -O "$filename" 2>&1 | grep --line-buffered -o "[0-9]*%"| xargs -L1 echo -en "" | tee "$output"
echo "$output"
exit 0