Return-Path: Delivered-To: apmail-ant-user-archive@www.apache.org Received: (qmail 54200 invoked from network); 1 Jul 2008 21:46:40 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 1 Jul 2008 21:46:40 -0000 Received: (qmail 11137 invoked by uid 500); 1 Jul 2008 21:46:37 -0000 Delivered-To: apmail-ant-user-archive@ant.apache.org Received: (qmail 11112 invoked by uid 500); 1 Jul 2008 21:46:37 -0000 Mailing-List: contact user-help@ant.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Ant Users List" Reply-To: "Ant Users List" Delivered-To: mailing list user@ant.apache.org Received: (qmail 11101 invoked by uid 99); 1 Jul 2008 21:46:37 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 01 Jul 2008 14:46:37 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [206.190.58.156] (HELO web55107.mail.re4.yahoo.com) (206.190.58.156) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 01 Jul 2008 21:45:44 +0000 Received: (qmail 96798 invoked by uid 60001); 1 Jul 2008 21:45:03 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=1HJHOM25mpZTR+MPjBOkaphnp4wUD6pFGvEJgfZ6h06ofE/RPdJ84QzObw3d4jWDW1Tyl/lTEiQn9WxXxoranRM8B7ldAXkL2hg+ykUV9syP3cGQVIqDB3cRdeXG/hGd1DrtEQiDO3zFbyj60UCT/ShQ4HPrHS2u5cEtb3Y251U=; X-YMail-OSG: NsWiSYIVM1lXZmALl69pDYaCtq1e5AYUlDTRuYvf5x.IvlnPS46bbgX7HaH4Wyk_qV7IpcpcYXgr6hDdsIiNbQBqwj730yccCML2x24qFQ8Q4KKV.qzzWogluWcdVGjQ2n6fOTC4lUd8hDV8I1QclMQ- Received: from [12.68.231.140] by web55107.mail.re4.yahoo.com via HTTP; Tue, 01 Jul 2008 14:45:03 PDT Date: Tue, 1 Jul 2008 14:45:03 -0700 (PDT) From: Matt Benson Subject: Re: How do you sort and remove duplicates lines from a file ? To: Ant Users List , paul_t100@fastmail.fm In-Reply-To: <486AA273.4050208@fastmail.fm> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <275543.96266.qm@web55107.mail.re4.yahoo.com> X-Virus-Checked: Checked by ClamAV on apache.org --- Paul Taylor wrote: > Wow Matt , that works nicely though not very > intuitive I'm not suprised > I couldnt find it. I dont suppose you know howe > could I remove the > duplicates lines now that it is sorted. My idea was > that I compare the > lines line by line and if the line matches the > previous line discard it > but I cant work out how to do it in ant. (Thanks > Jane but I need a pure > ant solution) The is supposed to cull the dupes for you. It works in my trivial test. Does it not work for you? -Matt > > thanks Paul > > Matt Benson wrote: > > All: I just added the following example to the > Ant > > manual in svn: > > > > > > > > > > > > > > > > > > > > > > > > > > -Matt > > > > --- "Scot P. Floess" > wrote: > > > > > >> Jane, I think your sort command would suppose > >> Linux/Unix or Cygwin? > >> > >> Paul, you might look to Ant Contrib's sortlist > task: > >> > >> > >> > > > http://ant-contrib.sourceforge.net/tasks/tasks/sortlist.html > > > >> HTH, > >> > >> Flossy > >> > >> On Tue, 1 Jul 2008, Jane Shen wrote: > >> > >> > >>> Do you mean "remove duplicates lines(not > files)"?? > >>> if so, then do > >>> > >>> sort -u "input_file" > "output_file"> Date: Tue, > 1 > >>> > >> Jul 2008 17:13:01 +0100> From: > >> paul_t100@fastmail.fm> To: user@ant.apache.org> > >> Subject: How do you sort and remove duplicates > lines > >> from a file ?> > Hi, is it possible to sort the > >> lines of a file alphabetically, and > remove > >> duplicates files, these seem simple enough thing > to > >> do but I cant > find anyway to do it.> > thanks > >> paul> > > >> > >> > > > ---------------------------------------------------------------------> > > > >> To unsubscribe, e-mail: > >> user-unsubscribe@ant.apache.org> For additional > >> commands, e-mail: user-help@ant.apache.org> > >> > > > _________________________________________________________________ > > > >>> Need to know now? Get instant answers with > Windows > >>> > >> Live Messenger. > >> > > > http://www.windowslive.com/messenger/connect_your_way.html?ocid=TXT_TAGLM_WL_messenger_072008 > > > >> Scot P. Floess > >> 27 Lake Royale > >> Louisburg, NC 27549 > >> > >> 252-478-8087 (Home) > >> 919-754-4592 (Work) > >> > >> Chief Architect JPlate > >> http://sourceforge.net/projects/jplate > >> Chief Architect JavaPIM > >> http://sourceforge.net/projects/javapim > >> > >> Architect Keros > >> http://sourceforge.net/projects/keros > >> > >> > >> > > > --------------------------------------------------------------------- > > > >> To unsubscribe, e-mail: > >> user-unsubscribe@ant.apache.org > >> For additional commands, e-mail: > >> user-help@ant.apache.org > >> > >> > >> > > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > > For additional commands, e-mail: > user-help@ant.apache.org > > > > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: > user-unsubscribe@ant.apache.org > For additional commands, e-mail: > user-help@ant.apache.org > > --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional commands, e-mail: user-help@ant.apache.org