echo "[...] waiting" read while true do clear if [ -e ./out ]; then rm ./out fi echo "[...] compiling..." g++ ./*.cpp -o out if [ -e ./out ]; then echo "[:)] compile succeed!" if [ -e ./testData ]; then ./out < ./testData else ./out fi else echo "[:(] compile failed" fi echo "[...] waiting..." read done