-
-
Save ShawnMilo/06c2242fa3df7b4001f2eabbeede66a3 to your computer and use it in GitHub Desktop.
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 | |
STAMP=$(date "+%Y-%m") | |
SEP="--------------------------------------------------------------------------------" | |
FILE="/home/shawn/Documents/time_tracking/$STAMP" | |
# only have one copy open | |
if [ "$(pgrep -f $FILE)" ]; then | |
exit | |
fi | |
#preferred format for date stamp | |
STAMP=$(date "+%Y-%m-%d %H:%M:%S (%A)") | |
printf "\n$SEP\n$STAMP\n\n" >> $FILE | |
DISPLAY=:0 mousepad $FILE & |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment