Skip to content

Instantly share code, notes, and snippets.

@HxxxxxS
Last active January 17, 2019 12:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save HxxxxxS/b0dd6a15bbf51080cf68ad6c2438c7ec to your computer and use it in GitHub Desktop.
Save HxxxxxS/b0dd6a15bbf51080cf68ad6c2438c7ec to your computer and use it in GitHub Desktop.
did file oneliner

Creates a ~/Documents/did/ directory with a new file every day.

Aliases to place in .bashrc/.bash_profile or similar

alias did='mkdir -p ~/Documents/did; echo -e "<$(date +%T)>\n$1" >> ~/Documents/did/$(date +%Y-%m-%d).txt'
alias showdid='cat ~/Documents/did/$(date +%Y-%m-%d).txt'

Usage:

[hans@hkudopro ~]$ did Made a did oneliner!
[hans@hkudopro ~]$ showdid
<13:55:54>
 Made a did oneliner!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment