common/tools/sortUnique.pl
author MattD <mattd@symbian.org>
Fri, 16 Oct 2009 14:57:32 +0100
changeset 684 6d65abb8bba1
parent 246 4f2482f1dd48
child 1284 0b4a09013baf
permissions -rw-r--r--
sf-run-evalid - minor change to make sure that evalid is run at the root of the build drive, which can stop the MD5s from being generated. (evalid requires dirs to be relative and not absolute)

#!perl -w
use strict;
# Sorts the input, removes duplicates, and outputs it

# Read it
my @content = <>;

# Sort it, and grep to remove duplicates
my $previous = "\n\n";
@content = grep {$_ ne $previous && ($previous = $_, 1) } sort @content;

# Write it
print @content;