Hoping the title is accurate. I'm not sure what the right term is.
I want to parse my mail log file and reuse the results but I'm having a hard time structuring the syntax. Something like:
Code:
grep hostname /var/log/mail.log | \
grep NOQUEUE: | \
sed -e 's/hostname postfix\/smtpd/[[0-9]*\]: //g'
at this point I want to redirect what I have in hand to a file but also ... fork? or split? whatever the term, to continue onward so that I can pipe the results further into wc -l or sort or programX... without having to re-loop through that huge log file.
Is this technique possible, what is it called or how might you do it?