Skip to content

Instantly share code, notes, and snippets.

@jstefanelli
Created October 8, 2019 19:18
Show Gist options
  • Select an option

  • Save jstefanelli/a4900cb99fbab7beba7ba28ab7658c1f to your computer and use it in GitHub Desktop.

Select an option

Save jstefanelli/a4900cb99fbab7beba7ba28ab7658c1f to your computer and use it in GitHub Desktop.
#!/bin/bash
gcc main.c -o main
for i in {0..3}
do
if [ $("cat input${i}.txt | ./main") != $("cat output${i}.txt") ] then
echo "Error for file: ${i}\n"
exit
fi
done
echo "OK\n"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment