function lb() { today=$(date '+%Y-%m-%d') fp="/home/you/logbook/${today}.md" if [ ! -f $fp ]; then echo "# ${today}" > $fp fi vim $fp }