-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvasp.clean.sh
executable file
·53 lines (41 loc) · 943 Bytes
/
vasp.clean.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
#!/bin/bash
wavecars=`find . -name WAVECAR`
chgcars=`find . -name CHGCAR`
chgs=`find . -name CHG`
outcars=`find . -name OUTCAR`
doscars=`find . -name DOSCAR`
runs=`find . -name vasprun.xml`
procars=`find . -name PROCAR`
to_remove=$wavecars' '$chgs' '$chgcars
to_archive=$outcars' '$doscars' '$runs' '$procars
#to_remove=$wavecars
if [ $1 == 'force' ] ; then
echo "Following files are removing:"
for i in $to_remove
do
echo -e '\t' $i
done
rm $to_remove
echo "Following files are gziping:"
for i in $to_archive
do
echo -e '\t' $i
done
gzip $to_archive
else
echo ""
echo "This is only informative mode of the vasp.clean.sh script."
echo "If you wish to realy clean VASP files type 'vasp.clean.sh force' command."
echo ""
echo "Following files will be removed:"
for i in $to_remove
do
echo -e '\t' $i
done
echo "Following files will be gziped:"
for i in $to_archive
do
echo -e '\t' $i
done
echo ""
fi