Topic
1 reply Latest Post - ‏2011-01-31T12:49:26Z by ishields
MateuszKowalczyk
MateuszKowalczyk
2 Posts
ACCEPTED ANSWER

Pinned topic one stdout into multiple stdout

‏2011-01-20T09:37:02Z |
Hello,
is it possible to redirect std-out into multiple st-dins?
example:


#!/bin/sh   echo 
'transfered data summary:' nice -n19 bzcat *.bz2 |\ nice -n19 grep /przykl |\ nice -n19 uniq |\ nice -n19 awk 
'BEGIN {FS="\""} {print $3}' |\ nice -n19 awk 
'BEGIN {FS=" "} {print $2}' |\ nice -n19 awk 
'{ suma+=$0 } { print suma }' |\ nice -n19 tail -n 1   echo 
'File request count:' nice -n19 bzcat *.bz2 |\ nice -n19 grep /przykl |\ nice -n19 uniq |\ nice -n19 wc -l   echo 
'End'


Files are huge logs (gigabytes) and i don't want to save any data during this process into files just display results.
and I want to execute this operation just once:


nice -n19 bzcat *.bz2 |\ nice -n19 grep /przykl |\ nice -n19 uniq |\


and redirect it's out into two inputs (wc and awk)

Is it possible and how?
Can someone give me an example?
Updated on 2011-01-31T12:49:26Z at 2011-01-31T12:49:26Z by ishields