Need an Ant example to delete the duplicate line from a file. is not working -


An ant script is required to remove duplicate rows from a file - & gt; Not working

  & lt; Copy file = "$ {logfile}" tofile = "c: /workspace/oracletest/servers.txt" overwrite = "yes" & gt; & Lt; Filterchain & gt; & Lt; Tokenfilter delimoutput = "\ n" & gt; & Lt; Containregex pattern = "(jb | ws)" flags = "i" /> & Lt; Stringtokenizer / & gt; & Lt; -! & Lt; Uniqfilter / & gt; - & gt; & Lt; / Tokenfilter & gt; & Lt; / Filterchain & gt; & Lt; / Copy & gt; & Lt; / Target & gt;    

seems to suggest that you have to use a sort filter, first Uniqfilter: & lt; Filter Chain & gt; & Lt; Tokenfilter delimoutput = "\ n" & gt; & Lt; Containregex pattern = "(jb | ws)" flags = "i" /> & Lt; Stringtokenizer / & gt; & Lt; / Tokenfilter & gt; & Lt; Sorter Filters / & gt; & Lt; Uniqfilter / & gt; & Lt; / Filterchain & gt;

Comments