Pete's Notebook
Rambling thoughts about D&D, Linux, and other things...Now featuring...College Stuff! Go Bruins!
What's here:
BSIT380
BSIT400
BSIT200
BSIT220
linux
sysadmin
TTRPG
BASH
Scripting: Is today the last day of the month?
Here's an easy way to check. Very useful when scripting an action (like a backup for example) that needs to happen on the last day of the month.
[ `date --date='next day' +'%B'` == `date +'%B'` ] || echo 'end of month' && echo 'not end of month'
Newer Post
Older Post
Home