Want to be notified remotely when a job has been finished (through email).
Also, include a few lines of final results (
stdout a.k.a. console output) as the content of the email.
tee command to make additional file with the content of
tail command to get a few lines of the last printed output after the job finished.
<job command> | tee <console output file path>; tail <console output file path> | mail -s "<mail title>" <mail address>
scons build/X86/gem5.opt | tee ~/temp/output.out; tail ~/temp/output.out | mail -s "gem5 X86 build completed" email@example.com