Mail Archives: cygwin/2005/08/25/05:52:53
I've trying to compare two files using diff from a .bat file :
diff -iX scripts/%2.ignorelist "%difffile1%" "%difffile2%"
The file is a cisco config file. A wc -l of the file tells me its over 500
lines long.
I'm using diff to compare an OLD file to a NEW one. Constantly a line
changes value:
590c590
< ntp clock-period 17179951
---
> ntp clock-period 17179955
So I wanted to exclude the ntp line and I put it in the ignorelist.
The ignorelist contains:
clock-period
Last configuration change
No configuration change
NVRAM config last
But diff constantly returns the same result (file changed). What have I
done wrong ??
I've also tried using grep as a precursor, but some basic grep tests
seem to go wrong:
In this below example, I've a file "c.txt" with a single line, "ntp",
and a copy of the config in a.txt You can see that a manual grep for
ntp works, but when I try to use the file, it fails..
C:\backups\__cisco_backups>type c.txt
ntp
C:\backups\__cisco_backups>grep -e ntp a.txt
ntp clock-period 17179955
ntp source Vlan135
ntp server 135.86.68.147
C:\backups\__cisco_backups>grep --file=c.txt a.txt
C:\backups\__cisco_backups>grep --file=c.txt a.txt
A.
--
------------------------------------------------------------------------
Adrian Marsh
Mobility Lab Support
*Postal:* Lucent Technologies, The Quadrant, Stonehill Green, Swindon,
SN5 7DJ, UK
Phone: /*+44 1793 883361*/
Digital FAX: /+44 1793 883361/
Office FAX: /+44 1793 897969/
EMAIL/: *marsh AT lucent DOT com <mailto:marsh AT lucent DOT com>* /
* No legacy is so rich as honesty. -William Shakespeare *
------------------------------------------------------------------------
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/
- Raw text -