That question is a bit complex and requires a long answer. Best bet look at some examples of Perl on google. Perl is a very powerful scripting language and can be used for things like that.
Good Luck
godown
2016-11-14 01:39:31 UTC
Perl Uniq
Ondrej
2015-05-26 00:00:35 UTC
The loop from the example above can be eliminated with the -n switch. Printing can be written simpler too:
perl -ne '{chop; $u{$_}++;} END {print $u{$_}."\t".$_."\n" for keys %u}' filetoscan.txt
2006-06-19 22:59:41 UTC
answers.google.com
ⓘ
This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.