The code below is meant to calculate the percentage completed when a file is getting dd.
percentDone=$(((varFileSize / backupSize) * 100)
I am able to debug the script running and the variables get assigned numbers. However as soon as the script runs this line percentDone remains at 0.
I have also tried this:
percentDone=$((varFileSize / backupSize))
percentDone=$((percentDone * 100))
Any ideas please let me know as really struggling with this problem! Thank you!!