I obviously missed something, and I know that the problem is that it creates an empty output, so it cannot compare. However, if someone could shed light on this, it would be great - I did not isolate him.
Ultimately, I am trying to compare md5sum with a list stored in a txt file, with that stored on the server. If errors, I need to report it. Here's the conclusion:
root@vps [~/testinggrounds]# cat md5.txt | while read ab; do > md5sum "$b" | read cd > if [ "$a" != "$c" ] ; then > echo "md5 of file $b does not match" > fi > done md5 of file file1 does not match md5 of file file2 does not match root@vps [~/testinggrounds]# md5sum file* 2a53da1a6fbfc0bafdd96b0a2ea29515 file1 bcb35cddc47f3df844ff26e9e2167c96 file2 root@vps [~/testinggrounds]# cat md5.txt 2a53da1a6fbfc0bafdd96b0a2ea29515 file1 bcb35cddc47f3df844ff26e9e2167c96 file2
source share