for file in md*/*; do ./myscript.sh "$file" >> result.out; done
I use the above command to print output from myscript and append result to result.out. Data in result.out can be seen below.
---------------------------------------------------
Report for logfile = ABC/a.log
---------------------------------------------------
ErrorCode 0 12.9.13.43
Time_req
2015-03-29 count 1082.000000
mean 159297.302218
std 143091.598683
min 94656.000000
25% 115803.250000
50% 128557.000000
75% 145264.250000
max 2580735.000000
---------------------------------------------------
Report for logfile = def/c.log
---------------------------------------------------
ErrorCode 0 12.9.13.52 1 12.9.13.51 2 12.9.13.46
Time_req
2015-03-28 count 7.820000e+02 771.000000 7.730000e+02
mean 4.167715e+05 320999.997406 4.109359e+05
std 4.000224e+06 1204153.141004 4.005233e+06
min 8.716000e+04 87598.000000 9.115800e+04
25% 1.104602e+05 109813.000000 1.092160e+05
50% 1.421680e+05 139038.000000 1.406030e+05
75% 2.459625e+05 229918.000000 2.272990e+05
max 1.097561e+08 25290018.000000 1.097695e+08
But I need to append horizontally and not vertically (like landscape mode). I want to avoid first write temporary file and then paste all files. I assume this is a common use-case and should have a better solution. These outputs are pandas dataframe printed by python.