Last active
August 29, 2015 13:57
-
-
Save wehrhaus/9755596 to your computer and use it in GitHub Desktop.
Simple note keeper script. Creates files based on date and timestamps entries.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Simple note keeper script. | |
# Creates files based on date and timestamps entries. | |
# setup date format to ##.##.## | |
dateStamp=$(date +"%m.%d.%y") | |
# write note to: | |
fileName=$HOME/TakeNote/note_${dateStamp}.txt | |
# get last line of file and display | |
lastLine=`tail -1 $fileName` | |
echo Last entry: "$lastLine" | |
# handle input | |
read -p "📝: " note | |
# write to file | |
echo $(date +"%r"): "$note" >> $fileName | |
# feedback once note entered | |
echo "$note" saved to "$fileName" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment