#!/bin/bash # ./compileAndRun $1 > ${1%/*}/${1#*/}.out 2>&1 ./compileAndRun $1 > $1.out 2>&1