#!/bin/bash cat > temp.c < #include EOF cat code1.c >> temp.c gcc -Wall -Werror -pedantic -std=gnu99 temp.c -o code1 2>errors.txt if [ "$?" = "0" ] then echo "Your code appears to have legal syntax!" echo "Here is what I get when I run it..." echo "-----------------" ./code1 echo "-----------------" echo "Here is what I would expect the answers to be:" echo "----------------" cat <