common/tools/sortUnique.pl
author Louis Henry Nayegon <louisn@symbian.org>
Mon, 05 Oct 2009 13:41:23 +0100
changeset 582 2b1ac4e5e2e8
parent 246 4f2482f1dd48
child 1284 0b4a09013baf
permissions -rw-r--r--
Update commands for clone and copy and use of makesis

#!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;