Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Message-ID: <430D94E7.4080700@lucent.com> Date: Thu, 25 Aug 2005 10:52:39 +0100 From: Adrian Marsh User-Agent: Mozilla Thunderbird 1.0.6 (Windows/20050716) MIME-Version: 1.0 To: cygwin AT cygwin DOT com Subject: Diff and grep problems Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes 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 * / * 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/