The mechanics of this shell syntax: ${1:-$(/dev/stdin)}
I recently came across this really neat syntax, in the context of creating bash functions which can accept an argument or a stream from STDIN (i.e. can be piped to). On the surface, I understand wh...