-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplotscript
More file actions
executable file
·53 lines (43 loc) · 1.5 KB
/
plotscript
File metadata and controls
executable file
·53 lines (43 loc) · 1.5 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
52
#!/bin/bash
#command line parameters (maximum error,problem number)
#take command line arguments
ERROR="$1"
PROBLEM="$2"
#define file and folder name for test run
NAME="problem${ERROR}_${PROBLEM}"
#check if directory exists
if [ -d ./Results/$NAME ]; then
echo "directory exists"
rm -r ./Results/$NAME
mkdir ./Results/$NAME
echo "directory deleted and new one created"
else
mkdir ./Results/$NAME
echo "directory created"
fi
#copy over data
cp ./Plot/*.dat ./Results/$NAME
#create plots
#for X in $(ls ./Plot/*.gpi)
#do
# SHORT="${X:7}" #remove path from X
# FILENAME=$(echo "$SHORT" | cut -d. -f1) #remove filetype from X
# mkdir -p ./Results/$NAME/$FILENAME #create sub directory for diff plots
# echo "Created Directory ./Results/$NAME/$FILENAME"
# gnuplot "$X" #run gnuplot wiht config files
# echo "Plotting $FILENAME"
# cp ./Grid.html ./Results/${NAME}/$FILENAME/${FILENAME}.html #copy over and rename result
# cp ./gp_image_01.png ./Results/${NAME}/$FILENAME/ #cp over required img
# echo "Plots coppied to ./Results/$NAME/$FILENAME"
#done
#echo "Script Complete"
for X in $(ls *.html)
do
FILENAME=$(echo "$X" | cut -d. -f1) #remove filetype from X
mkdir -p ./Results/$NAME/$FILENAME #create sub directory for diff plots
echo "Created Directory ./Results/$NAME/$FILENAME"
cp ./$X ./Results/${NAME}/$FILENAME/${FILENAME}.html #copy over and rename result
cp ./gp_image_01.png ./Results/${NAME}/$FILENAME/ #cp over required img
echo "Plots coppied to ./Results/$NAME/$FILENAME"
done
echo "Script Complete"