Footer.sh
From DarkWiki
This script is useful for identifying where cronjobs run. This is particularly helpful if the job produces an email which, eventually, you'll forget where it was produced. Simply tack the output of this script to the end of your email and Bob's your uncle.
It produces output along the lines of:
Executed ./footer.sh by fbloggs@10.180.211.91(fred001) on Wed Jul 30 10:22:16 BST 2014
Script
#!/bin/bash
echo "Executed $0 by $(whoami)@$(ifconfig eth0 | grep "inet addr" | sed "s/.*addr:\([0-9\.]*\) .*$/\1/g")($(hostname)) on $(date)"