LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   File comparison tool (https://www.linuxquestions.org/questions/linux-newbie-8/file-comparison-tool-859182/)

noony123 01-28-2011 03:40 AM

File comparison tool
 
Hi all.

I need to monitor the configuration of 100+ sites (cisco routers) on almost daily basis. I will be saving the base config and then need to compare by downloading the config of every site.

I have used Rancid for downloading the config. Now i need some other tool ( i know rancid provides diff to check the difference but still).

The file comparison tool should ignore blank space, carriage line feeds, spaces, tabs.

Can someone pls refer me a good tool for that ?

xeleema 01-28-2011 05:39 AM

Greetingz!

Just a few come to mind; grep, diff, maybe egrep. Oh, and sort!

Code:

grep -v "^#" /path/to/config1 | tee -a ~/config1
grep -v "^#" /path/to/config2 | tee -a ~/config2
diff ~/config1 ~/config2

You could also setup a "Version Control" repository like SVN or CVS to store the configuration files into, and then you could do compares between "versions".


All times are GMT -5. The time now is 04:54 AM.