-
Notifications
You must be signed in to change notification settings - Fork 2
/
save_data.sh
29 lines (21 loc) · 891 Bytes
/
save_data.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
# read -p "Enter the id of the docker container: " dockerCont
read -p "Enter the name of the output directory: " output
command_output=$(sudo docker ps)
echo "part 1"
while IFS= read -r line; do
if [[ $line == *"til_competition"* ]]; then
echo $line
dockerCont=$(echo $line | head -n1 | awk '{print $1}')
echo "Line containing 'til_competition': $line"
echo "First part of the line: $dockerCont"
echo "Using Docker ID: $dockerCont"
echo "Creating $output"
mkdir "localTestResults/$output"
docker cp $dockerCont:results/team_12000sgdplushie_results.jsonl localTestResults/$output/results.jsonl
for i in $(seq 0 4);
do
docker cp $dockerCont:results/team_12000sgdplushie_snapshot_$i.jpg localTestResults/$output/$i.jpg
done
fi
done <<< "$command_output"
docker compose down