I am trying to run the diff
command on two folders, check the return value and then output a message.
I have this:
#!/bin/bash
result='diff dir1 dir2'
if result == 0
then
echo "OK"
else
echo "ERROR"
fi
But I am getting result: command not found
How should I execute the command and return the value, to be compared in the IF
?