Re:Brilliant or insane code?
by akavel on Sunday September 01, 2013 @09:20AM
(#6310233)
By the way, I was recently surprised by a similar pattern in linux, where you can do:
to get result of:
by exploiting a similar trick, i.e. reading two times ('- -') from the same iterator (STDIN of 'paste')
[ Parent
| on HN ]
Thanks for posting this. For reference, paste is a standard UNIX utility, whose purpose is to do all sorts of useful things not limited to 2-tuples:
$ seq 1 9 | paste - - -
1 2 3
4 5 6
7 8 9
Re:Brilliant or insane code?
by tambourine_man on Sunday September 01, 2013 @07:30PM
(#6312646)
No need for parentheses,
echo -e "one\ntwo\nthree\nfour" | paste -d, - -
works just fine