Skip to content

Instantly share code, notes, and snippets.

@gabrielkfr
Created August 26, 2013 04:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gabrielkfr/6338181 to your computer and use it in GitHub Desktop.
Save gabrielkfr/6338181 to your computer and use it in GitHub Desktop.
Script bash que permite identificar si el día actual es el último día del mes.
#!/bin/bash
# Obteniendo el mes en letras
MES=`date +"%B"`
# Detectando fin de mes y mostrando en pantalla.
TOMORROW=`date --date=tomorrow +%d`
if [ $TOMORROW -eq "1" ]; then
echo "ALERTA: Hoy es el último día de $MES!"
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment