-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathget_pressures.sh
executable file
·31 lines (28 loc) · 1.04 KB
/
get_pressures.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
27
28
29
30
#!/bin/bash
if [ $1 ] && [ $2 ] && [ $3 ] && [ $4 ] && [ $5 ] && [ $6 ] && [ $7 ] ; then
for lev in $1 $2 $3 $4 ; do
echo "### LEVEL $lev:"
for i in $(seq $5 $6 $7) ; do
#echo -n "$i "
grep external ${lev}_CONF${i}_SP/OUTCAR -m 1| awk '{print $4}'
done
done
elif [ $1 ] && [ $2 ] && [ $3 ] && [ $4 ] && [ $5 ] && [ $6 ] ; then
for lev in $1 $2 $3 ; do
echo "### LEVEL $lev:"
for i in $(seq $4 $5 $6) ; do
#echo -n "$i "
grep external ${lev}_CONF${i}_SP/OUTCAR -m 1| awk '{print $4}'
done
done
elif [ $1 ] && [ $2 ] && [ $3 ] && [ $4 ] && [ $5 ] ; then
for lev in $1 $2 ; do
echo "### LEVEL $lev:"
for i in $(seq $3 $4 $5) ; do
#echo -n "$i "
grep external ${lev}_CONF${i}_SP/OUTCAR -m 1| awk '{print $4}'
done
done
else
echo "Need at least 5 arguments (level1 level2 [level3] frame0 stepsize endframe)"
fi