diff --git a/Git-shell-workshop b/Git-shell-workshop new file mode 160000 index 0000000..3764794 --- /dev/null +++ b/Git-shell-workshop @@ -0,0 +1 @@ +Subproject commit 37647942221ce860a9174cd6254c3414ce4e73f0 diff --git a/output1.txt b/output1.txt index 7c48d4a..e69de29 100644 --- a/output1.txt +++ b/output1.txt @@ -1,3 +0,0 @@ -19 -23 -27 diff --git a/script.sh b/script.sh old mode 100644 new mode 100755 index f9971f7..8c0b218 --- a/script.sh +++ b/script.sh @@ -5,3 +5,11 @@ # Run the python file, using input1.txt as stdin, and write the output to a file user_output1.txt # Display user_output1.txt to the user as user output, and the file output1.txt as the expected output # Once you have tested out the script and verified it's working, commit it to a branch: + +language=$1 +echo "The language passed as argument is: $1" +echo "User output" + +cat input1.txt | gcc $2 > output1.txt + + diff --git a/script2.sh b/script2.sh new file mode 100755 index 0000000..28ad84f --- /dev/null +++ b/script2.sh @@ -0,0 +1,19 @@ + + +for var in '$@' +do + echo "Running $var on test cases" + for i in $(seq 3) + do + echo "Running test case $i:" + cat input$i.txt | gcc $var > user_ouput$i.txt + echo "User output" + cat user_ouput$i.txt + echo "Expected output: " + cat output$i.txt + echo "---------------------------------------------------" + done + echo "========================================================" +done + + diff --git a/user_ouput1.txt b/user_ouput1.txt new file mode 100644 index 0000000..e69de29 diff --git a/user_ouput2.txt b/user_ouput2.txt new file mode 100644 index 0000000..e69de29 diff --git a/user_ouput3.txt b/user_ouput3.txt new file mode 100644 index 0000000..e69de29