ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Matt Benson <gudnabr...@yahoo.com>
Subject Re: How do you sort and remove duplicates lines from a file ?
Date Tue, 01 Jul 2008 21:45:03 GMT
--- Paul Taylor <paul_t100@fastmail.fm> 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 <union> 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:
> >
> > <concat>
> >   <union>
> >     <sort>
> >       <tokens>
> >         <resources refid="input" />
> >         <linetokenizer includedelims="true" />
> >       </tokens>
> >     </sort>
> >   </union>
> > </concat>
> >
> > -Matt
> >
> > --- "Scot P. Floess" <floess@mindspring.com>
> 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


Mime
View raw message