Keep Track of Your Current Work with a Bash Function

Dmitri Popov

Productivity Sauce

Mar 26, 2014 GMT
Dmitri Popov

Here is a clever little trick I picked from a Hacker News thread. Using a simple custom now() function, you can keep track of things you are currently working on. Add the following code to the ~/.bashrc file:

now() {
      echo $(date "+%Y-%m-%d %H:%M:%S") - "$@" >> $HOME/.now
    }

Save the changes, and you can then record tasks by running the now Task description command, for example: now Working on an article. This records the specified task in the ~/.now text file in the following format: 2014-03-21 15:17:13 - Working on an article. You can also use special words like pause, continue, and done to mark the task as paused, resumed and completed. The thread contains more advanced variations of this simple trick, so if you need something more flexible than the basic function, make sure to check the posts in the thread.

comments powered by Disqus

Issue 170/2015

Buy this issue as a PDF

Digital Issue: Price $9.99
(incl. VAT)

News

njobs Europe
What:
Where:
Country:
Njobs Netherlands Njobs Deutschland Njobs United Kingdom Njobs Italia Njobs France Njobs Espana Njobs Poland
Njobs Austria Njobs Denmark Njobs Belgium Njobs Czech Republic Njobs Mexico Njobs India Njobs Colombia