oh thanks.. its working exactly to my requirement.. thanks a lot
Matt Benson-2 wrote: > > Assuming yourfile.txt: > >>>>> <concat> >>>>> <union> >>>>> <sort> >>>>> <tokens> > <file file="yourfile.txt" /> >>>>> <linetokenizer includedelims="true" /> >>>>> </tokens> >>>>> </sort> >>>>> </union> >>>>> </concat> > > > > On Nov 9, 2009, at 12:12 PM, cvsusr wrote: > >> >> Is it possible to give a complete example with a text file. I dont >> know how >> to pass resource to this block. >> >> Matt Benson-2 wrote: >>> >>> Well, my example you cited sorts and removes duplicates. If you >>> don't want to sort them, take out the <sort> and <union> the <tokens> >>> directly. >>> >>> On Nov 9, 2009, at 9:41 AM, cvsusr wrote: >>> >>>> >>>> Is there any way to remove the duplicate line in a file?? I gone >>>> through this >>>> post, but didnt find a solution in ant. Please let me know. >>>> >>>> thanks >>>> >>>> >>>> Scot P. Floess wrote: >>>>> >>>>> I hate to admit this...I have never used the concat target...I have >>>>> completely overlooked it in the past :( >>>>> >>>>> >>>>> On Tue, 1 Jul 2008, 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" <flo...@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_t...@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-unsubscr...@ant.apache.org> For additional >>>>>>> commands, e-mail: user-h...@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-unsubscr...@ant.apache.org >>>>>>> For additional commands, e-mail: >>>>>>> user-h...@ant.apache.org >>>>>>> >>>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> >>>>>> ------------------------------------------------------------------ >>>>>> -- >>>>>> - >>>>>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >>>>>> For additional commands, e-mail: user-h...@ant.apache.org >>>>>> >>>>>> >>>>> >>>>> 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-unsubscr...@ant.apache.org >>>>> For additional commands, e-mail: user-h...@ant.apache.org >>>>> >>>>> >>>>> >>>> >>>> -- >>>> View this message in context: http://old.nabble.com/How-do-you-sort- >>>> and-remove-duplicates-lines-from-a-file---tp18219748p26268505.html >>>> Sent from the Ant - Users mailing list archive at Nabble.com. >>>> >>>> >>>> -------------------------------------------------------------------- >>>> - >>>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >>>> For additional commands, e-mail: user-h...@ant.apache.org >>>> >>> >>> >>> --------------------------------------------------------------------- >>> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >>> For additional commands, e-mail: user-h...@ant.apache.org >>> >>> >>> >> >> -- >> View this message in context: http://old.nabble.com/How-do-you-sort- >> and-remove-duplicates-lines-from-a-file---tp18219748p26271085.html >> Sent from the Ant - Users mailing list archive at Nabble.com. >> >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@ant.apache.org >> For additional commands, e-mail: user-h...@ant.apache.org >> > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: user-unsubscr...@ant.apache.org > For additional commands, e-mail: user-h...@ant.apache.org > > > -- View this message in context: http://old.nabble.com/How-do-you-sort-and-remove-duplicates-lines-from-a-file---tp18219748p26272720.html Sent from the Ant - Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@ant.apache.org For additional commands, e-mail: user-h...@ant.apache.org