Last active
March 8, 2017 00:05
-
-
Save loreguerra/c6e6e474c6c58dcdd09396c01b7a59e7 to your computer and use it in GitHub Desktop.
Simple app to log hours via command line
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 | |
cd ~/Dropbox/time-log/ | |
echo "$1" "$2" >> log.txt | |
date "+DATE: %m/%d/%y%nTIME: %I:%M:%S%n%n" >> log.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
#ADD THESE ALIASES TO BASH PROFILE | |
alias log='~/Dropbox/time-log/log.sh' | |
alias hours='cat ~/Dropbox/time-log/log.txt' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In command line, from any folder type
log PROJECT start
(or end) to get a timestamp saved to log file.To view hours, type
hours
.