First commit
This commit is contained in:
BIN
Lab1/Lab1.pdf
Normal file
BIN
Lab1/Lab1.pdf
Normal file
Binary file not shown.
BIN
Lab1/a.out
Normal file
BIN
Lab1/a.out
Normal file
Binary file not shown.
4
Lab1/compile_script.sh
Normal file
4
Lab1/compile_script.sh
Normal file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
gcc -Wall -Werror test.c
|
||||
./a.out < input.txt > output.txt
|
||||
diff correct_output.txt output.txt
|
1
Lab1/correct_output.txt
Normal file
1
Lab1/correct_output.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello
|
31
Lab1/history_backup.txt
Normal file
31
Lab1/history_backup.txt
Normal file
@@ -0,0 +1,31 @@
|
||||
108 15:06 pwd
|
||||
109 15:06 mkdir "Lab 1"
|
||||
110 15:06 cd Lab\ 1/
|
||||
111 15:08 cd ..
|
||||
112 15:08 rm Lab\ 1/
|
||||
113 15:09 rmdir Lab\ 1/
|
||||
114 15:09 mkdir lab1
|
||||
115 15:09 mv lab1/ Lab1
|
||||
116 15:09 cd D
|
||||
117 15:09 cd Lab1/
|
||||
118 15:10 touch test.c
|
||||
123 15:14 nano test.c
|
||||
124 15:14 gcc -Wall -Werror test.c
|
||||
125 15:14 echo Hello world > input.txt
|
||||
126 15:14 echo Hello planet >> input.txt
|
||||
127 15:15 cat input.txt
|
||||
128 15:15 echo Hello > correct_output.txt
|
||||
129 15:15 ./a.out < input.txt
|
||||
130 15:17 ./a.out < input.txt > output.txt
|
||||
131 15:17 diff correct_output.txt output.txt
|
||||
132 15:17 diff correct_output.txt incorrect
|
||||
133 15:22 echo Hello world > incorrect_output.txt
|
||||
134 15:22 diff correct_output.txt incorrect_output.txt
|
||||
135 15:23 history | tail -n 20 > script.sh
|
||||
136 15:23 nano script.sh
|
||||
137 15:25 nano tmp.txt
|
||||
138 15:25 cat tmp.txt script.sh > compile_script.sh
|
||||
139 15:25 ls
|
||||
141 15:26 chmod +x compile_script.sh
|
||||
142 15:26 ./compile_script.sh
|
||||
143 15:28 history > history_backup.txt
|
1
Lab1/incorrect_output.txt
Normal file
1
Lab1/incorrect_output.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello world
|
2
Lab1/input.txt
Normal file
2
Lab1/input.txt
Normal file
@@ -0,0 +1,2 @@
|
||||
Hello world
|
||||
Hello planet
|
1
Lab1/output.txt
Normal file
1
Lab1/output.txt
Normal file
@@ -0,0 +1 @@
|
||||
Hello
|
3
Lab1/script.sh
Normal file
3
Lab1/script.sh
Normal file
@@ -0,0 +1,3 @@
|
||||
gcc -Wall -Werror test.c
|
||||
./a.out < input.txt > output.txt
|
||||
diff correct_output.txt output.txt
|
7
Lab1/test.c
Normal file
7
Lab1/test.c
Normal file
@@ -0,0 +1,7 @@
|
||||
#include<stdio.h>
|
||||
int main(int argc, char** argv){
|
||||
char temp[100];
|
||||
scanf("%s", temp);
|
||||
printf("%s\n", temp);
|
||||
return 0;
|
||||
}
|
1
Lab1/tmp.txt
Normal file
1
Lab1/tmp.txt
Normal file
@@ -0,0 +1 @@
|
||||
#!/bin/bash
|
35
Lab1/to_submit.txt
Normal file
35
Lab1/to_submit.txt
Normal file
@@ -0,0 +1,35 @@
|
||||
108 15:06 pwd
|
||||
109 15:06 mkdir "Lab 1"
|
||||
110 15:06 cd Lab\ 1/
|
||||
111 15:08 cd ..
|
||||
112 15:08 rm Lab\ 1/
|
||||
113 15:09 rmdir Lab\ 1/
|
||||
114 15:09 mkdir lab1
|
||||
115 15:09 mv lab1/ Lab1
|
||||
116 15:09 cd D
|
||||
117 15:09 cd Lab1/
|
||||
118 15:10 touch test.c
|
||||
123 15:14 nano test.c
|
||||
124 15:14 gcc -Wall -Werror test.c
|
||||
125 15:14 echo Hello world > input.txt
|
||||
126 15:14 echo Hello planet >> input.txt
|
||||
127 15:15 cat input.txt
|
||||
128 15:15 echo Hello > correct_output.txt
|
||||
129 15:15 ./a.out < input.txt
|
||||
130 15:17 ./a.out < input.txt > output.txt
|
||||
131 15:17 diff correct_output.txt output.txt
|
||||
132 15:17 diff correct_output.txt incorrect
|
||||
133 15:22 echo Hello world > incorrect_output.txt
|
||||
134 15:22 diff correct_output.txt incorrect_output.txt
|
||||
135 15:23 history | tail -n 20 > script.sh
|
||||
136 15:23 nano script.sh
|
||||
137 15:25 nano tmp.txt
|
||||
138 15:25 cat tmp.txt script.sh > compile_script.sh
|
||||
139 15:25 ls
|
||||
141 15:26 chmod +x compile_script.sh
|
||||
142 15:26 ./compile_script.sh
|
||||
143 15:28 history > history_backup.txt
|
||||
#!/bin/bash
|
||||
gcc -Wall -Werror test.c
|
||||
./a.out < input.txt > output.txt
|
||||
diff correct_output.txt output.txt
|
Reference in New Issue
Block a user