Title is BS i know, i tried my best to sum it up but, anyway, the problem is this:
Code:
someBigFile= ************* <<<-----<<<-<<<-<<<-<-<-<--<-<-<-<-<-<--<-<-<-<--- INIT THIS!
summ="Global"
function doMD5
{
md5=`md5sum $someBigFile`
echo ${md5:0:32} #kind of returning
}
(
echo $'\n'
summ="$(doMD5)" &
)|
zenity --progress --pulsate --title="MD5" --text="Saving MD5 checksum..." --auto-close
if [ "$?" != 0 ]
then
zenity --warning --title "CANCELED" --text "Aborted by user, FILES NOT DELETED."
kill `pidof -s md5sum`
kill $$ # No time to tell if i need this too, i think i'll leave it where it is for now
fi
echo $summ
This script opens a zenity pulsating bar during the checksum and kills it should the user click "Cancel". Problem is $summ echoes his initialization value and not the output of that function. I'm definitely wasting too much time on this single issue!