Skip to content

Instantly share code, notes, and snippets.

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