Skip to content

Instantly share code, notes, and snippets.

@slickplaid
Created October 2, 2017 16:57
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 slickplaid/864c8e587b021e7d10e5f6d6ba8c045a to your computer and use it in GitHub Desktop.
Save slickplaid/864c8e587b021e7d10e5f6d6ba8c045a to your computer and use it in GitHub Desktop.
CLI Notes => ~/notes.md
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
}
@slickplaid
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment