Hands-on task
Last day of the month
Write a script /usr/local/bin/eom that prints the last day of the month in YYYY-MM-DD format. With no arguments — for the current month, and if a date YYYY-MM-DD is passed — for that date's month (for example, eom 2025-03-08 prints 2025-03-31). Don't hardcode: the script must work for any date.
- date
- -d
- last day of the month
- relative shift
- %F