Skip to content

Instantly share code, notes, and snippets.

@mazuhl
Created June 21, 2012 13:09
Show Gist options
  • Save mazuhl/2965652 to your computer and use it in GitHub Desktop.
Save mazuhl/2965652 to your computer and use it in GitHub Desktop.
Cut columns from file, reorder and show only unique values
cut -d ',' -f11,9 file.txt | ruby -ne 'puts $_.split(",")[1].chomp + "," + $_.split(",")[0].chomp' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment