Skip to content

Instantly share code, notes, and snippets.

@titsuki
Last active January 17, 2022 16:03
Show Gist options
  • Save titsuki/f1ddfc210756fc9004d38324b0540338 to your computer and use it in GitHub Desktop.
Save titsuki/f1ddfc210756fc9004d38324b0540338 to your computer and use it in GitHub Desktop.
perl -e 'my %h; while(<>) { my ($k, $v) = split("\t"); $h{$k} += $v; }; for my $k (@{[ sort { $h->{$b} <=> $h->{$a} } keys %h ]}[0..19]) { print join("\t", ($k, $h{$k})),"\n" }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment