Rao Chaudhri schrieb am 26.07.2010 um 11:22 (-0700):
> I have an xml file which lists JAR file names in it with space
> specified as a delimiter. There are duplications of JAR files name in
> the file and I was wondering if there is a way to some how get ride of
> the duplication, to get a file which has a unique set of JAR file
> names?

If you happen to have Perl around, you could use <exec> to do:

perl -nale '$j{$_}++ for @F; END {print for sort keys %j}' < jars.txt

* define a structure to reduce duplicates (set or map)
* tokenize input
* store in structure
* print output, possibly sorted

-- 
Michael Ludwig

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

Reply via email to