I am trying to get the base64 md5 value of the latest file in an oracle backup directory:
for file in "$(find /oracle/PD1/sapbackup/b*/ -newermt $date -type f)"; do openssl md5 -binary $file | base64 && echo $file >>/md5check/$date/PD1/md5local.txt; done
When I run this command I get the full md5 checksum:
But I want to get the base64 value:
# openssl md5 -binary /oracle/PD1/sapbackup/beyrnmmq/cntrlPD1.dbf | base64 Y1l1t+SGpQ7Jh0GZm9R5oQ==
How can I do this using a for loop and output the file path + md5 value to a file?