lundi 22 avril 2019

bash IF condition with OR logic syntax

i am confused..

i just make if file does not exist OR md5 sum is wrong

something like this

md5=20ffa23fbb589484d03d79608fe8d2ad
if ! -f /tmp/1.txt  || echo -n ${md5} /tmp/1.txt | md5sum --status --check -
then
 ....
fi

how write valid syntax?

Aucun commentaire:

Enregistrer un commentaire