Last active
May 10, 2018 08:51
-
-
Save tastytea/0b3c6d28400638fa1dea637e4f52a8f1 to your computer and use it in GitHub Desktop.
Prüft, ob heute oder morgen ein feiertag ist.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
today="$(date +'%d.%m.%Y')" | |
tomorrow="$(date -d tomorrow +'%d.%m.%Y')" | |
for holiday in $(feiertage -region Niedersachsen $(date +'%Y') | awk '{print $1}'); do | |
if [[ "${holiday}" != "Niedersachsen" ]]; then | |
if [[ "${holiday}" == "${today}" ]]; then | |
echo "Heute ($(date +'%A')) ist ein feiertag." | |
fi | |
if [[ "${holiday}" == "${tomorrow}" ]]; then | |
echo "Morgen ($(date -d tomorrow +'%A')) ist ein feiertag." | |
fi | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment