blob: 9dd712fd5993497f13a8aba7aaa5a47286690c8b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
|
#!/usr/bin/env bash
#
# Return today's daily notes file. If it doesn't already exist, make it using the
# daily template. Must be executed from inside the notes directory.
#
DATEFMT="+%Y.%-m.%-d"
DATE=$(date $DATEFMT)
FILE="daily/$DATE.md"
if [[ ! -f "$FILE" ]]; then
cat templates/daily.md | sed "s/{{date:YYYY.M.D}}/$DATE/" > $FILE
fi
echo "$FILE"
|