#!/bin/sh fullname=$GEDIT_CURRENT_DOCUMENT_NAME name=${fullname%.*} gnome-terminal -x bash -c " rm $name; g++ $fullname -o $name -lm -std=c++11 -Wall; time ./$name; echo press any key to continue... ; read; "