I have several reporting scripts that send me email overnight. When receiving such an email it is useful to know its origins. Using something like Rundesk
that centralizes a catalog of scripts to be run on machines would be best, but I am not yet prepared to install and support this tool. And so, for now, I am just adding a line at the end of each message with its origin using the command
echo -e "\nSource $USER@$HOSTNAME:$(readlink -f $0)"
which, for the hypothetical script at $HOME/bin/reports/tellme.sh on host42, outputs