EXE=swap # name of the file rm $EXE # remove the executable g++ -O -o $EXE $EXE.cc # compile source ./$EXE <$EXE.in >$EXE.out # run executable, redirect output cat $EXE.out # display output # less $EXE.out # uncomment for long output