#!/bin/bash

mv -f ./bands.dat ./bands.dat.OLD

# run the bands calc
mpirun pw.x < bands.in 2>&1 |tee  bands.out

# catch the eigenvalues
awk '
/^ *k =/{
getline;getline;
print $0
}
' ./bands.out > bands.dat

exit
