X-Recipient: archive-cygwin AT delorie DOT com X-SWARE-Spam-Status: No, hits=-3.0 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW,SARE_MSGID_LONG40,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: sourceware.org MIME-Version: 1.0 In-Reply-To: <98091D8BAF39E746A7D3E618C948528D09F89F@DF-M14-02.exchange.corp.microsoft.com> References: <20091026172622 DOT GB790 AT ednor DOT casa DOT cgf DOT cx> <0105D5C1E0353146B1B222348B0411A20886DC6D7B AT NIHMLBX02 DOT nih DOT gov> <98091D8BAF39E746A7D3E618C948528D09F89F AT DF-M14-02 DOT exchange DOT corp DOT microsoft DOT com> Date: Mon, 26 Oct 2009 15:59:04 -0400 Message-ID: Subject: Re: How to increase the memory available to diff in cygwin 1.7? From: Kenneth Chiu To: Stephan Mueller Cc: "cygwin AT cygwin DOT com" Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-DKIM-Results: unsigned (cs.binghamton.edu) X-Spam-Score: -13 (-) X-Spam-Report: Spam detection software, running on the system "necro.cs.binghamton.edu", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Well, it really depends on one's familiarity. I can run find on both directory roots, to get a list of all files. I want breadth-first, but I think find can do that. The output needs to be sorted for each directory, since I also need to find files in one that are not in the other. I am not sure that I can just run sort to do that, due to the special ordering that I need to give the / character, relative to other non-alphanum characters. [...] Content analysis details: (-1.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.4 ALL_TRUSTED Passed through trusted hosts only via SMTP X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: 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 Well, it really depends on one's familiarity. I can run find on both directory roots, to get a list of all files. I want breadth-first, but I think find can do that. The output needs to be sorted for each directory, since I also need to find files in one that are not in the other. I am not sure that I can just run sort to do that, due to the special ordering that I need to give the / character, relative to other non-alphanum characters. Now I need to read each list, in parallel, line-by-line. If the file from list 1 is greater than the file in list 2, then the file is missing in dir 2, and vice versa. If a file is a directory in one, but not in the other, then I need to advance one list to skip that dir. For example, if foo is a directory in a, but not in b, then the breadth first output is: a/f1 a/f2 a/foo a/g a/h_dir_in_both a/j a/foo/f1 a/foo/f2 a/h_dir_in_both/g1 b/f1 b/f2 b/foo b/g b/h_dir_in_both b/j b/h_dir_in_both/g1 At this point, it starts to seem easier to do in C++, though I wouldn't be terribly surprised if there was some easier way to do it via shell scripting that I have missed. On Mon, Oct 26, 2009 at 3:35 PM, Stephan Mueller wrote: > Kenneth Chiu writes: > " cmp doesn't recurse, though, at least as far as I can tell. > " In theory, I could use find, then cmp, plus some scripting, > " but seems simpler to just write a small C program > " to do it. > > Really? =A0Your definition of 'simpler' may differ from mine, but > given an existing tool for recursion and one for comparison, I'm > not sure that writing in C, which will require you to take care > of both of those tasks yourself, is simpler. =A0But up to you how > you want to do it, of course. > > stephan(); > -- Problem reports: http://cygwin.com/problems.html FAQ: http://cygwin.com/faq/ Documentation: http://cygwin.com/docs.html Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple