Created
November 28, 2014 17:05
-
-
Save SamRothCA/ae1541b61bf777a5918f to your computer and use it in GitHub Desktop.
Calendar for current month
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
cal | grep --before-context 6 --after-context 6 --color -e " $(date +%e)" -e "^$(date +%e)" |
What is the difference @pi1ot ?
@pi1ot I got segfault.
This wouldn't work when the date number shows up in the year number. (e.g. 20th April, 2015) This works better. Also, change the shell to be /bin/bash if you're using an alternate shell.
cal | head -n 1; cal | tail -n +2 | grep --before-context 6 --after-context 6 --color -e " $(date +%e)" -e "^$(date +%e)"
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cal | grep --before-context 6 --after-context 6 --color -e "$(date +%e) " -e "^$ (date +%e)" -e "$(date +%e)$"