Sample Header Ad - 728x90

Wait until md5sum command is completed

3 votes
2 answers
767 views
#!/bin/bash cd /path-to-directory md5=$(find . -type f -exec md5sum {} \; | sort -k 2 | md5sum) zenity --info \ --title= "Calculated checksum" \ --text= "$md5" The process of a recursive checksum calculation for a directory takes a while. The bash script doesn´t wait until the process is finished it just moves to the next command which is the dialog box, that displays the calculated checksum. So the dialog box shows a wrong checksum. Is there an option to tell the script to wait until the calculation of the checksum is finished? Furthermore, is there an option to pipe the progress of the checksum calculation to some kind of progress bar like in zenity for example?
Asked by stewie (45 rep)
Oct 25, 2022, 01:15 PM
Last activity: Oct 27, 2022, 04:22 PM