diff options
author | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-06-17 19:35:51 +0100 |
---|---|---|
committer | Matthew Lemon <chaffinach+git@protonmail.ch> | 2022-06-17 19:35:51 +0100 |
commit | d62a3bbc09568fe5a453d103e325ef809a634e40 (patch) | |
tree | d4c2c5472eee4c4d2abe45d90dd9cca191f0aaa3 | |
parent | 436832b74a7d16e73b0a2d14319b7b39d70117db (diff) |
add a level 1 header to new file
Diffstat (limited to '')
-rwxr-xr-x | lem | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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" |