#Get electronic energies for all .out in current folder
#!/bin/bash
outname=Eall.txt
rm -f $outname
for inf in `ls -v *.out`
do
echo Processing ${inf} ...
echo ${inf} >> $outname
./Shermo ${inf} | grep "Electronic energy:" | cut -d: -f 2 >> $outname
done
echo "Data have been exported to $outname in current folder"