Skip to content

Instantly share code, notes, and snippets.

@bredmor
Last active August 5, 2020 12:51
Show Gist options
  • Save bredmor/40d272134f956748a2b2720e4b3ce9d5 to your computer and use it in GitHub Desktop.
Save bredmor/40d272134f956748a2b2720e4b3ce9d5 to your computer and use it in GitHub Desktop.
EZ Timelog
alias tlog='bash ~/tlog.sh'
alias tend='bash ~/tend.sh'
alias tview='cat ~/work.txt'
mkdir ~/worklog
touch ~/work.txt
#!/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!"
#!/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