Wednesday, September 01, 2021

Re: Run a command on "last day of month"

Goetz Schultz:

> I would go the other way and check tomorrows date. If it is "01", then I
> know today is the last of this month:
>
> date --date="tomorrow" +%d
> 02

That's not OpenBSD.

$ date --date="tomorrow" +%d
date: unknown option -- -
usage: date [-aju] [-f pformat] [-r seconds]
[-z output_zone] [+format] [[[[[[cc]yy]mm]dd]HH]MM[.SS]]

--
Christian "naddy" Weisgerber naddy@mips.inka.de

No comments:

Post a Comment