Skip to content

Instantly share code, notes, and snippets.

@akkartik
Last active March 7, 2017 02:45
Show Gist options
  • Save akkartik/cabd07de10c2a00f780af73be3f2db19 to your computer and use it in GitHub Desktop.
Save akkartik/cabd07de10c2a00f780af73be3f2db19 to your computer and use it in GitHub Desktop.
Script to emit lines prefixed by line length
cat *.cc |line-length.pl |sort -nr |less
#!/usr/bin/perl -w
while (<>) {
print length . ' ' . $_ . "\n";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment