Last active
August 5, 2020 12:51
-
-
Save bredmor/40d272134f956748a2b2720e4b3ce9d5 to your computer and use it in GitHub Desktop.
EZ Timelog
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
alias tlog='bash ~/tlog.sh' | |
alias tend='bash ~/tend.sh' | |
alias tview='cat ~/work.txt' |
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
mkdir ~/worklog | |
touch ~/work.txt |
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 | |
WORK_TIME=$(date +"%I:%M%p") | |
END_STRING="$WORK_TIME - EOD" | |
echo "$END_STRING" >> ~/work.txt | |
cp ~/work.txt ~/worklog/$(date +"%m-%d-%y").txt | |
: > ~/work.txt | |
echo "Workday ended, go relax!" |
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 | |
read -p "What are you working on? " WORK_NAME | |
WORK_TIME=$(date +"%I:%M%p") | |
WORK_STRING="$WORK_TIME - $WORK_NAME" | |
echo "$WORK_STRING" >> ~/work.txt | |
echo "Logged." |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment