ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ivan Ivanov <rambiusparkisan...@yahoo.com>
Subject Re: Filters: sort and uniq
Date Tue, 16 Nov 2004 13:54:17 GMT
Jochen,

ant-contrib[1] has <sortlist>[2] task does does some
sorting. Below is an example that takes files
conatining of all rpms installed on my machine
(generated with rpm -qa > rpms) and sorts it:

<project>
    <taskdef
resource="net/sf/antcontrib/antcontrib.properties"/>
    <loadfile srcfile="rpms" property="rpms.list"/>
    <sortlist property="sorted.rpms.list"
value="${rpms.list}"                 
delimiter="${line.separator}" />
    <echo message="${sorted.rpms.list}" />    
</project>

Good luck,
Ivan

[1]http://ant-contrib.sourceforge.net/
[2]http://ant-contrib.sourceforge.net/tasks/sortlist.html

--- Jochen Wiedmann <jochen.wiedmann@softwareag.com>
wrote:

> 
> Hi,
> 
> at least as of Ant 1.6.2, there don't seem to be
> filters with the 
> functionality of "sort" (A Unix tool sorting the
> lines of a file) or 
> "uniq" (Another Unix tool deleting lines from a
> file, which do not match 
> given uniqueness constraints). I typically help
> myself by using these 
> Unix tools in a pipe.
> 
> Is there any interest in contributing such filters
> to the Ant core? If 
> so, I'd volunteer to provide patches. If not, I
> won't waste my time and 
> stick with the command line. :-) (Oh, btw, and an
> "exec" filter could be 
> useful too, running an external filter. :-)
> 
> 
> Regards,
> 
> Jochen
> 
> 
>
---------------------------------------------------------------------
> To unsubscribe, e-mail:
> user-unsubscribe@ant.apache.org
> For additional commands, e-mail:
> user-help@ant.apache.org
> 
> 



		
__________________________________ 
Do you Yahoo!? 
Meet the all-new My Yahoo! - Try it today! 
http://my.yahoo.com 
 


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message