Skip to content

Instantly share code, notes, and snippets.

@ethiapath
Last active January 16, 2020 21:27
Show Gist options
  • Save ethiapath/e5a89a533b3b04d2d2dcbc4e52252e14 to your computer and use it in GitHub Desktop.
Save ethiapath/e5a89a533b3b04d2d2dcbc4e52252e14 to your computer and use it in GitHub Desktop.
Creates a text file with today's date and appends a new line with the current time.
# open the daily log
# add this function to your .bashrc(linux) or .bash_profile(macos)
# create a folder wherever you want your log path to be.
o() {
LOGPATH='~/LOG'
FILEPATHE=$LOGPATH/$(date +"%Y_%m_%d-%b_%a").md
touch $FILEPATH
echo >> $FILEPATH
HEADER="## $(date +"%I:%M %p") -"
echo $HEADER >> $FILEPATH
vim + $FILEPATH
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment