Question:
I am trying to compare the hash of a copied file with bash but the condition is not working.Answer:
The condition fails, because the resulting strings are actually not the same. You need to cut out the hash by using the cut command.- -d specifies the delimiter. In this case we use a single space
- -f1 selects the field of the output. Here we want to only have the first field, which is the hash
If you have better answer, please add a comment about this, thank you!