bash script for compiling and plotting sim.cpp