This still seems to be an issue under Linux lite 5.2.
Running lite-updates via the command line I get awk: cmd. line:1: (FILENAME=- FNR=34) fatal: division by zero attempted
Also get the same issue running Linux lite on Virtualbox.
Hacking the lite-updates bash script to test for 0 division when totoal is zero is a workaround.
awk ' BEGIN { FS=" "; total=1;end_download=0} /upgraded/ {total= $1 + $3;FS="[ :]" } /^Get:[[:digit:]]+/ {printf "#Downloading %s %s %s\n",$7,$(NF-1),$NF;if(total >0){print int(($2 - 1) * 100 / total);}
But never done any bash programming and pretty new to linux so no idea why the upgraded match is not being hit?
Running lite-updates via the command line I get awk: cmd. line:1: (FILENAME=- FNR=34) fatal: division by zero attempted
Also get the same issue running Linux lite on Virtualbox.
Hacking the lite-updates bash script to test for 0 division when totoal is zero is a workaround.
awk ' BEGIN { FS=" "; total=1;end_download=0} /upgraded/ {total= $1 + $3;FS="[ :]" } /^Get:[[:digit:]]+/ {printf "#Downloading %s %s %s\n",$7,$(NF-1),$NF;if(total >0){print int(($2 - 1) * 100 / total);}
But never done any bash programming and pretty new to linux so no idea why the upgraded match is not being hit?