From d62a3bbc09568fe5a453d103e325ef809a634e40 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Fri, 17 Jun 2022 19:35:51 +0100 Subject: add a level 1 header to new file --- lem | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lem b/lem index 5c4fb9f..6e266ad 100755 --- a/lem +++ b/lem @@ -1,8 +1,8 @@ -#!/bin/bash +#!/usr/local/bin/bash NOTES=/home/$USER/Notes TARGET_DIR=$NOTES/homezet -VIM=/usr/bin/vim +VIM=/usr/local/bin/vim if [[ "$1" = "-m" ]]; then msg="${*:2}" @@ -16,6 +16,7 @@ fi STAMP="$(date +%G%m%d%H%M%S)" F_PATH="$TARGET_DIR/$STAMP-$msg.md" -echo $F_PATH + +printf "# %s\n\n", "$msg" >> "$F_PATH" $VIM "$F_PATH" -- cgit v1.2.3