-
Notifications
You must be signed in to change notification settings - Fork 0
/
speaker_heuristic_all.sh
executable file
·30 lines (29 loc) · 966 Bytes
/
speaker_heuristic_all.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
data="didact"
follower="cautious"
args_list=(
"12 $data $follower 99 49184 0"
"12 $data $follower 99 98506 1"
"12 $data $follower 99 92999 2"
)
echo
echo "==================================================="
echo "Starting with args:"
for args in "${args_list[@]}"; do
echo "$args"
done
echo "==================================================="
echo
for args in "${args_list[@]}"; do
screen_name=$(echo "$args" | tr ' ' '-')
if screen -ls | grep -q "$screen_name" >/dev/null; then
screen -S "$screen_name" -X kill
echo "Restart screen $screen_name"
else
echo "Starting screen ${screen_name}"
fi
screen -dmS "${screen_name}" bash -c "./speaker_heuristic.sh ${args}"
done
echo "============================================================================"
echo "All sessions started. See screen -ls. After run screens close automatically."
echo "============================================================================"