Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Git-shell-workshop
Submodule Git-shell-workshop added at 376479
3 changes: 0 additions & 3 deletions output1.txt
Original file line number Diff line number Diff line change
@@ -1,3 +0,0 @@
19
23
27
8 changes: 8 additions & 0 deletions script.sh
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -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: <your_name>

language=$1
echo "The language passed as argument is: $1"
echo "User output"

cat input1.txt | gcc $2 > output1.txt


19 changes: 19 additions & 0 deletions script2.sh
Original file line number Diff line number Diff line change
@@ -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


Empty file added user_ouput1.txt
Empty file.
Empty file added user_ouput2.txt
Empty file.
Empty file added user_ouput3.txt
Empty file.