-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_tires.sh
More file actions
37 lines (32 loc) · 895 Bytes
/
Copy pathrun_tires.sh
File metadata and controls
37 lines (32 loc) · 895 Bytes
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
#!/bin/bash
fileInp='input.para'
fileDat='data.para'
## ----------------------------------------------
## ----------------------------------------------
## Read working directory from fileInp
n=0
while read line; do
n=$((n+1))
# read number of zones
if [ $n = 8 ]; then
nzones=$line
fi
wline=$((33+(5*nzones)))
# read working directory name
if [ $n = $wline ]; then
wdir=$line
fi
done < $fileInp
[ "${wdir: -1}" != "/" ] && wdir=${wdir}'/'
echo WorkDir: $wdir
## ----------------------------------------------
## Prepare time stamp
tstamp=$(date +'%y%m%d_%H%M%S')
echo TimeStamp: $tstamp
## ----------------------------------------------
## Run the afterprocessing of Trans-dimensional Inversion
nohup ./tires $fileInp $fileDat > ${wdir}${tstamp}.log 2>&1 &
## ----------------------------------------------
## PID to file
echo PID: $!
echo $! > ${wdir}${tstamp}.pid