Skip to content

Instantly share code, notes, and snippets.

@ephbaum
Last active September 1, 2023 15:44
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 ephbaum/28b29f96d2e0c24dc1605442ea4cdbd7 to your computer and use it in GitHub Desktop.
Save ephbaum/28b29f96d2e0c24dc1605442ea4cdbd7 to your computer and use it in GitHub Desktop.
Create Daily Note File
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