IN="$(mktemp --suffix .f90)" OUT="$(mktemp)" cat > "$IN" gfortran -o "$OUT" "$IN" if [ $? -eq 0 ]; then exec "$OUT" fi