Guest User

Untitled

a guest
May 13th, 2014
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. bash-4.3$ perl -pe 's/(.*?)( ?)(\w+)\n(.*)/\1\n\4\3\2/ while!s/^\n(.*)/\1\n/' <<< 'hello there everyone'
  2. everyone there hello
  3.  
  4. bash-4.3$ perl -pe 's/(.*?)( ?)(\w+)\n(.*)/\1\n\4\3\2/ while!s/^\n(.*)/\1\n/' <<< 'ab c d e f g h i j k l m n o p q r s t u v w x y z'
  5. z y x w v u t s r q p o n m l k j i h g f e d c ab
  6.  
  7. bash-4.3$ perl -pe 's/(.*?)( ?)(\w+)\n(.*)/\1\n\4\3\2/ while!s/^\n(.*)/\1\n/' <<< 'a bc de fg hi jk lm no pq rs tu vx xy'
  8. xy vx tu rs pq no lm jk hi fg de bc a
Advertisement
Add Comment
Please, Sign In to add comment