Hi feherke... you are right.. but it is difficult to explain the whole problem.. I think I will output the results of each step to a temp file then join the temp files togther... Thanks
Thanks p5wizard but I don't have two files to be merged!.. my script has many steps; after the first step I have an output file, in the next steps I'd like to continue writing on the same output file but adding the results in columns.. I wish it's clear now :-)
Hi,
I have this output file:
RET1 Src1
Tgt1 5
Tgt2 6
Tgt3 8
.
.
I want to read other data and add the results in the third column of previous output file.. to get this one:
RET1 Src1 Src2
Tgt1 5 2
Tgt2 6 3
Tgt3 8 1
.
.
How can I add the new data to be in columns...
Annihilannic : Thank you for your codes...
Just one thing may I should precise: I can't read all the files at once because I need the the results to be in a special order... I applied your first code and it gives the results like this:
Erg1 Erg2 Erg3 Erg4 Erg5
10 25 85 45 23
12...
Hi,
I have many files to be read and then put the results in ONE Output file... The output file should have this line as first line:
Erg1 Erg2 Erg3 Erg4 Erg5
The results will be arranged below this line like this:
Erg1 Erg2 Erg3 Erg4 Erg5
12 15 20 17 11
22 55 32 11...
According to my knowledge, I found this method in two steps :
1- awk '{if (NF==8) printf ($1"\n"$3"\n"$5"\n"$7"\n")}' input > out
2- awk 'BEGIN {j=0} {if (NF>0) printf ($1" "); j++;} {if (j==146) {printf ("\n"); j=0;}}' output > Results
Hi All,
I have a file with 1215450 lines long, here is few lines:
1.06189E-08 0.6320 0.00000E+00 0.0000 0.00000E+00 0.0000 2.66971E-09 1.0000
0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000 0.00000E+00 0.0000
1.27355E-10 1.0000 7.50482E-10 1.0000 0.00000E+00 0.0000...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.