Quantcast
Channel: User Kamil Maciorowski - Super User
Viewing all articles
Browse latest Browse all 837

Comment by Kamil Maciorowski on How to reuse the content of file descriptor more than once?

$
0
0
wc -lc will do both jobs. OK, I understand your wcs are examples and you may want to use other tools. In principle you can do gzip -dc bigfile.json.gz | tee >(consumer1) >(consumer2) … | consumerN. All consumers will work concurrently, so their output may be interleaved and there is no firm way to foresee in what sequence they will print or to tell which part of output comes from which consumer. Redirecting output of each consumer to a separate file may be a good start of solving this problem.

Viewing all articles
Browse latest Browse all 837

Trending Articles