-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathgetEnergies.sh
executable file
·27 lines (16 loc) · 942 Bytes
/
getEnergies.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
##RUN THIS SCRIPT INSIDE THE DIRECOTRY WHERE THE DIRECTORIES CONTAINING THE OUTPUTS FILES WHERE CREATED.
name=${PWD##*/}
outer=1 #outer loop counter
#begining of outer loop
for dir in */ ; do
cd $dir
molecule=${PWD##*/}
E=`grep 'sigma' OUTCAR | tail -n1`
cat>> ../energies$name.txt <<EOF
${PWD##*/} ${E}
EOF
cd ..
done
echo
exit 0