Most every time I write a shell script with bash, I need a date in there somewhere. And most every time, I need to read the man page to work out what the heck the format is I like. Now it’s documented here:
This outputs as Name Of Month_Today’s Date_The 24 hour clock time right now.
It’s useful to enclose in backticks:
df -h | mail -s “The disk usage at: `date ‘+%b_%d_%H%M’`” firstname.lastname@example.org