fork(1) download
  1. #!/bin/bash
  2.  
  3. awk 'NR>2{a[$1]++}END{for(i in a)printf i"_"a[i]}'
Success #stdin #stdout 0s 5884KB
stdin
5  
A mystery chemical formula...  
Ba      0.000   0.000  0.000  
Hf      0.5     0.5    0.5  
O       0.5     0.5    0.000  
O       0.5     0.000  0.5  
O       0.000   0.5    0.5  
stdout
O_3Hf_1Ba_1