Skip to content

Instantly share code, notes, and snippets.

@drench
Created October 28, 2011 14:32
Show Gist options
  • Select an option

  • Save drench/1322405 to your computer and use it in GitHub Desktop.

Select an option

Save drench/1322405 to your computer and use it in GitHub Desktop.
Reverse lines in a file
perl -pe '$_ = ++$x."\t$_"' | sort -nr | cut -f2-
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment