Skip to content

Instantly share code, notes, and snippets.

@astj
Created January 21, 2014 08:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astj/8536216 to your computer and use it in GitHub Desktop.
Save astj/8536216 to your computer and use it in GitHub Desktop.
(A,B,C)が沢山並んでるのを(C,A,B)って並び替える
$ echo '(1,2,3)(2,2,3)(3,2,3)' | perl -pale '$_ =~ s/\((.+?),(.+?),(.+?)\)/\($3,$1,$2\)/g;'
(3,1,2)(3,2,2)(3,3,2)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment