Created
March 31, 2018 11:47
-
-
Save SketchingDev/aecdb0698d6194f6587547e3cb4b4753 to your computer and use it in GitHub Desktop.
Bash function for saving commands and their output to jrnl (http://jrnl.sh/)
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
#!/bin/bash | |
# Save commands/output to jrnl - the command line journal | |
# 1. Install jrnl (http://jrnl.sh/) | |
# 2. Reference this file, or copy the function, into your bash profile | |
function save(){ | |
SAVE_COMMAND=$(echo "$@") | |
SAVE_OUTPUT=$($@) | |
echo "$SAVE_OUTPUT" | |
echo -e "$SAVE_COMMAND\n$SAVE_OUTPUT\n@terminal" | jrnl | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment