From c7038ec53ac27a936d69d3d0aa3e1325a424ecb4 Mon Sep 17 00:00:00 2001 From: Edward Date: Wed, 2 Sep 2026 15:08:57 -0500 Subject: [PATCH] Fix for bash octal --- bin/mg | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bin/mg b/bin/mg index c78f32a..567d1b4 100755 --- a/bin/mg +++ b/bin/mg @@ -4,13 +4,16 @@ # Optionally include a second search term year=`date +%Y` +month=`date +%m` # File to gather all content into topic=$1 if [ ! -n "$1" ]; then echo "A topic to gather is required." exit 1 fi -fname=$(printf "$HOME/Journal/$year/%02d-$topic.md" $(date +%m)) + +mkdir -p "$HOME/Journal/$year" +fname="$HOME/Journal/$year/$month-$topic.md" archive="$HOME/Journal/archive-$year/" # Files to gather -- 2.47.3