Hello,
I have the output:
brouter mdstat # md5sum -c /root/mdstat.md5
/proc/mdstat: OK
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.
I've tried:
Quote:
md5sum /proc/mdstat > /root/mdstat.md5
md5sum -c /root/mdstat.md5 > /root/mdstat.exit
if [ "/root/mdstat.exit" -ne "/proc/mdstat: OK" ]
then
echo "Danger!"
fi
|
But it gives me errors... what should I do?
Thanks a lot everyone!