-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrunAll.sh
More file actions
executable file
·53 lines (49 loc) · 1.21 KB
/
runAll.sh
File metadata and controls
executable file
·53 lines (49 loc) · 1.21 KB
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
declare -a arr=(
"LC A02-01"
"LC A02-06"
"LC A02-07"
"LC A02-24"
"LC A02-25"
"LC A02-26"
"LC A02-27"
"LC A02-28"
"LC A02-29"
"LC A03-01"
"LC A03-05"
"LC A03-09"
"LC A03-13"
"LC A04-01"
"LC A04-02"
"LC A04-03"
"LC A04-04"
"LC A04-05"
"LC A04-06"
"LC A04-07"
"LC A04-08"
"LC A04-09"
"LC A04-10"
"LC A04-11"
"LC A04-12"
"LC A04-13"
"LC A04-14"
"LC A04-15"
"LC A04-16"
"LC A04-17"
"LC A04-18"
"LC A04-19"
"LC A04-20"
)
# get length of an array
arraylength=${#arr[@]}
# use for loop to read all values and indexes
for (( i=0; i<${arraylength}; i++ ));
do
echo "index: $((i+1)), value: ${arr[$i]}"
# replace spaces with underscores in the loadcase name
replaced=$(echo "${arr[$i]}" | tr ' ' '_')
cd "/media/frederik/SecondHDD/Intamin/BucklingRunFeModel/5247FlyingIslandArmFEModel52/"
cat Groups.unv ThicknessSI.unv "Static Stress Results_$((i+1)).unv" > /home/frederik/theScriptingEngineer/Python/Buckling/Projects/Intamin/FeModel01BucklingFEAInput.unv
cd ~/theScriptingEngineer/Python/Buckling
python3 app_async3.py Projects/Intamin/FeModel01"$replaced"BucklingInput.json
done