Wednesday, June 22, 2005

sed: Swap two words around

$ cat test
first:second
one:two
$ sed 's/\(.*\):\(.*\)/\2:\1/' test
second:first
two:one

0 Comments:

Post a Comment

<< Home