Personal logs help me remember what I do day to day, and can help with summarizing the state of my work at recurring meetings. This makes the creation and editing of personal logs easier.
This script creates a log file (just a text file) named with the date in the scheme YYYY-MM-DD.txt
By default it creates it in ~/logs
, if the dir does not exist it will create it
The editor is easily configurable in the file. By default it is set to micro
, that is what I use
This is a file I am using to practice writing bash scripts, it is not meant to be super polished and I commit directly to master when I think of new features. Get in touch if you think of anything that might be useful!
logutil
Creates a new log file with the date and opens it
logutil [ -s ] [ -o ] [ -l ] [ -c ] [ -y ]
-s search string; search for string in ~/logs/ from anywhere, uses grep and returns colored grep output
-o open a log, e.g. after using -s to search; give it just the date e.g. logutil -o 2021-06-02
-l lists all logs in ~/logs
; makes it easy to see created logs and grep for them
-c create; creates log for the provided date (e.g. logutil -c 2021-12-25
)
-y create; opens log for yesterday's date. Does not open the last log chronologically
/usr/local/bin
chmod +x /usr/local/bin/logutil