generated from nuwank7/IT1050-Tutorial-01
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run.sh
63 lines (55 loc) · 1.06 KB
/
run.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
# validate() {
# output="cat $1"
# ans="cat $2"
# eval $output
# echo $mystring
# while IFS= read -r line
# do
# echo "$line";
# done <<< "$output"
# #while IFS= read -r line; do echo "LINE: '${line}'"; done <<< "$x"
# #eval $ans
# }
echo Which program do you want to run?
echo
echo 1 - Tute01.c
echo 2 - Tute02.c
echo 3 - Tute03.c
echo 4 - Tute04.c
echo
read -p 'Enter your Choice (1-4) : ' no
case $no in 1*)
filename="Tute01.c"
;;
2*)
filename="Tute02.c"
;;
3*)
filename="Tute03.c"
;;
4*)
filename="Tute04.c"
;;
esac
clang-7 -pthread -lm -o main $filename
./main
# echo
# echo
# read -p 'Do you want to Test if your program is correct ? (Y/N) :' choice
# if [ $choice == 'Y' ] || [ $choice == 'y' ]; then
# case $no in 1*)
# ./main < test01a.in > test01a.out
# validate "test01a.out" "test01a.ans"
# ;;
# 2*)
# filename="Tute02.c"
# validate "test01a.out" "test01a.ans"
# ;;
# 3*)
# filename="Tute03.c"
# ;;
# 4*)
# filename="Tute04.c"
# ;;
# esac
# fi