forked from meom-group/DCM
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdcmtk_tourne
executable file
·44 lines (39 loc) · 1001 Bytes
/
dcmtk_tourne
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
#!/bin/bash
# display a spining figure according to the rate of integration
# as seen by time.step file
# class = @Run progression tools@
usage() {
echo
echo "USAGE: $(basename $0 ) [-h] "
echo
echo " PURPOSE:"
echo " Display a spinning star according to the progress of time.step"
echo " This script must be run in the running directory, where time.step is."
echo
echo " OPTIONS:"
echo " -h : Display this help message"
echo
exit 0
}
tourne() {
echo -n '-' ; printf " $* \r" ; sleep $wait
echo -n '\' ; printf " $* \r" ; sleep $wait
echo -n '|' ; printf " $* \r" ; sleep $wait
echo -n '/' ; printf " $* \r" ; sleep $wait
}
while getopts :h opt ; do
case $opt in
(h) usage ;;
(*) usage ;;
esac
done
wait=0.25
nb=0
while (( 1 != 2 )) ; do
n=$(cat $(cat waytmp)/time.step)
while [ $n == $nb ] ; do
n=$(cat $(cat waytmp)/time.step)
nb=$n
done
tourne $(cat $(cat waytmp)/time.step)
done