Last active
September 1, 2023 15:44
-
-
Save ephbaum/28b29f96d2e0c24dc1605442ea4cdbd7 to your computer and use it in GitHub Desktop.
Create Daily Note File
This file contains hidden or 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
DaySuffix() { | |
case $(date +%d) in | |
01|21|31) echo "st";; | |
02|22) echo "nd";; | |
03|23) echo "rd";; | |
*) echo "th";; | |
esac | |
} | |
alias dailyfile="echo \"# $(date '+%A, %B %-d')$(DaySuffix), $(date '+%Y')\n\" > $(date '+%Y-%m-%d')-daily.md" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment