by oftenwrong · 4y ago · 0 comments
From your description I guess something like « pee a b » would be the same as « a | b »? If so that’s cool, but the one line descriptions definitely need a rework.
$ seq 3 | tee somefile
1
2
3
╔═somefile
seq═tee═╣
╚═stdout
$ seq 10 | pee 'head -n 3' 'tail -n 3'
1
2
3
8
9
10
╔═head═╗
seq═pee═╣ ╠═stdout
╚═tail═╝I think Zsh supports this natively with its "multios" option, `a > >(b c y z) > >(c)`. But then you have to write the rest of your pipe inside the ().
I once had to use an IBM mainframe shell(cms If I remember correctly) which had pipes however IBM in their infinite wisdom decided to make the pipe network the primary interface, while this made complex pipes a bit less awkward, simple(single output) pipes were wordy compared to the unix equivalent.