zing has asked for the wisdom of the Perl Monks concerning the following question:
I want names to be swapped while keeping the numbers untouched(i.e. in the same rows as they were), bob-jay....LIST.txt jay 21 34 56 bob 12 39 jay 11 10 bob 14 jay 190 bob 13
What I tried, but aint the complete solution cut -f2- -d ' ' list.txt | awk '{print "Jay " $0}'bob 21 34 56 jay 12 39 bob 11 10 jay 14 bob 190 jay 13
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Swapping names of list while keeping the contents as it is.
by philiprbrenan (Monk) on Aug 30, 2012 at 18:32 UTC | |
|
Re: Swapping names of list while keeping the contents as it is.
by johngg (Canon) on Aug 30, 2012 at 22:13 UTC | |
|
Re: Swapping names of list while keeping the contents as it is.
by zing (Beadle) on Aug 30, 2012 at 18:31 UTC |