This is a simple function that can be called from the command line, just like if it was a regular command. It is a quick way of taking notes and storing them in a text file.
Just add the following lines to your ~/.bashrc:
# My function to take quick notes on useful commands
notes() {
echo $1 >> $HOME/notes.md
}
It can be used like this:
$ notes "my_command -which -I -want -to remember"
You can read your notes like this:
$ more ~/notes.md
Latest comments (28)
Lovely trick, thanks for sharing!
I recently wrote a python script to do this sort of thing. You can create gists or retrieve gists with it. It takes input from stdin so I guess you can use it to take notes too. Here check it out: github.com/CanNuhlar/CLI-Gist-Client
A minimal tool I use for command line notes is jrnl.
Installing it is as simple as
pip install jrnlA note can be created by
jrnl today at 3pm : Subject. Content.It is especially useful when debugging, for revisiting assumptions.
that's how i did it:
in .bash_aliases
to add an entry
how() { echo "$@" | tee -a ~/Dropbox/howto.txt; }to display the notes taken
alias howto='more ~/Dropbox/howto.txt'I love this - and ran away with it a bit - here is a version that also allows editing in vim and making the notes distributable with git. Also lets you serve a pretty version with grip if you have it.
You could also make this into a time journal to note how you feel on certain time, it's the same thing.
I've created the system only for me since I don't to deal with auth and stuff. It has two versions, one on the web and the other one on terminal running on NodeJS. I use Firebase as my database.
Wow nice!, this is so useful.
notes(){ if [ ! -z "$1" ]; then echo "[" $(date +"%Y%m%d %H:%M:%S"@$(hostname)"]" "@" >> "$HOME/notes.md"; else if [ ! -f "$HOME/notes.md" ]; then echo "No notes!"; #touch "$HOME/notes.md"; exit 0; else cat - >> "$HOME/notes.md"; # or cat "$HOME/notes.md"; for show all notes :P fi fi }And in Windoze Cmd its..
copy con mynotes.txtwith Shift + F6 to exit. :)Nice! I created a similar thing for PowerShell just a while back.
``