Task – need to generate routes file for openvpn from list of our networks.
Check, if file different from current route script, replace one and do some action. This task occurs very often.
Code is very simple, so:
if [ `diff /root/test /root/test1 | wc -l ` -eq 0 ];
then
echo "no difference";
else echo "differ";
rm -f /root/test; mv /root/test1 /root/test;
fi
Recent Comments