<?xml version="1.0" encoding="windows-1252"?>
<node id="990815" title="Swapping names of list while keeping the contents as it is." created="2012-08-30 14:25:54" updated="2012-08-30 14:25:54">
<type id="115">
perlquestion</type>
<author id="955048">
zing</author>
<data>
<field name="doctext">
Hi all,

I have a list like this(jay-bob)..
&lt;code&gt;
LIST.txt

jay 21 34 56
bob 12 39

jay 11 10
bob 14

jay 190
bob 13
&lt;/code&gt;
I want names to be swapped while keeping the numbers untouched(i.e. in the same rows as they were), bob-jay....
&lt;code&gt;

bob 21 34 56
jay 12 39

bob 11 10
jay 14

bob 190
jay 13
&lt;/code&gt;

What I tried, but aint the complete solution
&lt;code&gt; cut -f2- -d ' ' list.txt | awk '{print "Jay " $0}' &lt;/code&gt;</field>
</data>
</node>
