I have the output:
brouter mdstat # md5sum -c /root/mdstat.md5
I would like to have a script that has IF function in it, so every time the output of that md5sum command will have any other output, to echo a message.
md5sum /proc/mdstat > /root/mdstat.md5
md5sum -c /root/mdstat.md5 > /root/mdstat.exit
if [ "/root/mdstat.exit" -ne "/proc/mdstat: OK" ]
But it gives me errors... what should I do?
Thanks a lot everyone!