I am in need of creating and checking checksums between a local file, and the remote file I just pushed. If the MD5 checks, continue, else break. This needs to be in KORN shell scripting because we are using AIX machines.
here's the code I have so far:
for file in <<Directory>>; do -- Get MD5 of local file LOCALMD5=!chsum "$(basename "$file")" sftp <<USER>>@<<IP>> <<EOF PUT file <<SFTP OUTPUT FOLDER>> REMOTEMD5= <<<COMMAND HERE>>>> <<--- Which command? IF [[LOCALMD5!=REMOTEMD5]]; THEN RETURNVALUE = -1 BREAK done print RETURNVALUE
How do I get the remote MD5 checksum?