我总共有64个文件,每个文件名如下:
diffusion-isomalto-thermo1.dat_x.xmgr
diffusion-isomalto-thermo2.dat_x.xmgr
diffusion-isomalto-thermo3.dat_x.xmgr
diffusion-isomalto-thermo4.dat_x.xmgr
.
.
diffusion-isomalto-thermo64.dat_x.xmgr
每个文件包含以下格式的两列数据:
5.000 1.047
10.000 1.107
15.000 1.211
20.000 1.083
25.000 1.166
30.000 1.368
35.000 1.179
40.000 1.307
45.000 0.985
50.000 0.954
包含50000行数据。你知道吗
我想要的是所有文件(64个文件)中所有第一行第二列的平均值,接下来是所有文件中第二行第二列的平均值。你知道吗
有什么好办法?你知道吗
使用
GNU awk
:假设
diffusion*
的globbing只拾取您想要的64个文件。如果不使用更严格的方法,比如diffusion-isomalto-thermo*.dat_x.xmgr
。你知道吗相关问题 更多 >
编程相关推荐