Code: Select all
wget -c "Valid-URL" -O "whatever 1.extention" \
&& notify-send -i info -t 0 "Downloading 1" "finished" \
|| notify-send -i error -t 0 "Downloading 1" "failed"
Code: Select all
notify-send -i info -t 0 "Downloading 1" "finished"
result served nor this
Code: Select all
notify-send -i error -t 0 "Downloading 1" "failed"
I only know of trapping ctrl+c and others and creating a function that is used (usually for temp files deletions and such) when e.g. ctrl+c was pressed.
But that would not give me any info which file name exactly was aborted but only a rather generic error, like so
Code: Select all
function error_exit () {
notify-send -i error -t 0 "Downloading failed due to script interruption." \
"Check files manually!"
}
Code: Select all
whatever 01.extention
whatever 01.extention
up to
whatever 22.extention
But that creates too much complexity and thus too much risk of bugs to even consider.