Created
October 2, 2017 16:57
-
-
Save slickplaid/864c8e587b021e7d10e5f6d6ba8c045a to your computer and use it in GitHub Desktop.
CLI Notes => ~/notes.md
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
notes() { | |
if [ ! -z "$1" ]; then | |
# Using the "$@" here will take all parameters passed into | |
# this function so we can place everything into our file. | |
echo "$@" >> "$HOME/notes.md" | |
else | |
# If no arguments were passed we will take stdout and place | |
# it into our notes instead. | |
cat - >> "$HOME/notes.md" | |
fi | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
From https://dev.to/ricardomol/note-taking-from-the-command-line-156