Skip to content

Instantly share code, notes, and snippets.

@wktk
Created June 25, 2012 10:29
Show Gist options
  • Save wktk/2987858 to your computer and use it in GitHub Desktop.
Save wktk/2987858 to your computer and use it in GitHub Desktop.
ドメインを TLD からソートするワンライナー
perl -F\. -nae "push@d,join('.',reverse(@F));END{print join('.',reverse(split(/\./)))foreach sort(@d)}" domains.txt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment