I have two files:
File 1
hc Value
cluster0 0.1
cluster0 0.2
cluster0 0.3
cluster1 0.3
cluster1 0.5
cluster0 0.8
cluster2 0.9
cluster2 0.9
cluster0 0.0
File 2
hc mean
cluster0 0.35
cluster1 0.4
cluster2 0.9
And I would like to create a new table like:
File 3
hc Value mean
cluster0 0.1 0.35
cluster0 0.2 0.35
cluster0 0.3 0.35
cluster1 0.3 0.40
cluster1 0.5 0.40
cluster0 0.8 0.35
cluster2 0.9 0.90
cluster2 0.9 0.90
cluster0 0.0 0.35
How can I do this in bash? Is there any command that can easily do this?