Skip to content

Instantly share code, notes, and snippets.

Created Jan 19, 2015
Embed
What would you like to do?
stdin
_jshon() {
shopt -s lastpipe
{ tee /dev/fd/3 | jshon "$@"; } 3>&1 |
input=$(</dev/fd/0)
((PIPESTATUS)) || echo "$input"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment