Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: "Robert M. Riches Jr." <spamtrap42@xxxxxxxxxxx>
- Date: Thu, 31 Aug 2006 00:22:01 GMT
On 2006-08-30, Vilmos Soti <vilmos@xxxxxxx> wrote:
"Robert M. Riches Jr." <spamtrap42@xxxxxxxxxxx> writes:
Even more, here is a way to check if this is the last day of the month:
(not checked)
month=$(date +'%h')
if ! date --date=tomorrow | grep -q " $month "; then
echo last day of the month
fi
Ensure that there is no collision with the month names anywhere.
Or, how about comparing the output of the command
date -date=tomorrow +%d
against the string "01"? Today is the last day of the month
iff tomorrow day-of-month is 1.
Your solution is even better and simpler than mine.
(but for the archive record, use --date= instead of -date=.)
You are correct. Thanks for catching and correcting my error.
--
Robert Riches
spamtrap42@xxxxxxxxxxx
(Yes, that is one of my email addresses.)
.
- References:
- Scheduling Jobs - Last day of the month - HOWTO?
- From: Michael B . Johnson
- Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: Chris F.A. Johnson
- Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: Michael B . Johnson
- Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: Vilmos Soti
- Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: Robert M. Riches Jr.
- Re: Scheduling Jobs - Last day of the month - HOWTO?
- From: Vilmos Soti
- Scheduling Jobs - Last day of the month - HOWTO?
- Prev by Date: Re: How to find out what libraries a binary calls?
- Next by Date: Re: [OT] Re: Linux Dealt a DEATH BLOW by Apple !!!!!!! - - Information about "Alan Connor"
- Previous by thread: Re: Scheduling Jobs - Last day of the month - HOWTO?
- Next by thread: Re: Scheduling Jobs - Last day of the month - HOWTO?
- Index(es):
Relevant Pages
|