in reply to read column in perl
Or this:$ paste file1 file2 | perl -lane 'print "@F[1,0,2,3]"' 1 a 6 11 2 b 7 12 3 c 7 13 4 d 8 14 5 e 9 23
$ paste file1 file2 | awk '{print $2, $1, $3, $4}'
You can change the field separator in either example to suit.
--
John.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: read column in perl
by DentArthurDent (Monk) on Mar 08, 2005 at 12:54 UTC | |
by jmcnamara (Monsignor) on Mar 08, 2005 at 13:29 UTC | |
by wolfger (Deacon) on Mar 08, 2005 at 13:41 UTC |