awk help
Simon Cox
simon at cerberus.earth.monash.edu.au
Thu Aug 13 10:21:39 EDT 1992
> How about simply using awk to read the numbers into two separate temporary
> files, then using paste to put them together. This will do what you seem to
> be asking for if both input files have the same number of lines.
>
> awk '{ printf ("%f\t%f\n", $1,$2) }' input_file_1 > temp_1
> awk '{ printf ("%f\t%f\n", $3,$4) }' input_file_2 > temp_2
> paste temp_1 temp_2 > output_file
>
> This will create an output file containing the first two fields from
> input_fiel_1 and the third and fourth fields from input_file_2 on each line,
> separated by tabs. Of course, you can edit this to reflect the proper
> input fields, separators, etc.
>
Ah! Now I see. paste nee' lam. Thanks Mike.
_________________________________
Dr Simon Cox |
|
Department of Earth Sciences |
Monash University |
Clayton Vic 3168 |
Australia |
|
Phone (03) 565 5762 |
Fax (03) 565 5062 |
________________________________|
More information about the grass-user
mailing list