On Thu, 1 Dec 2005, Simon Roberts wrote:
Ooops, sorry, didn't quite mean that syntax for "tee" :( too early in the morning. Use
mytemp=$(mktemp) do ... ... done | tee $mytemp wc -l $mytemp
Or even done | tee ${mytemp} | wc -l
Cheers, Simon
--- Simon Roberts <thorpflyer@yahoo.com> wrote:
I think the syntax you want will be based on this:
for x in list do stuff... done | wc -l
That'll pipe the output from the loop for you
If you need the output to go to wc in addition to its normal destination, then use tee (... done | tee | wc -l )
HTH Cheers, Simon
--- Arie Reynaldi Z <reymanx@gmail.com> wrote:
Hi All,
I'd like to make a list members and total member from my milis using ezmlm-list. I make this script:
#!/bin/bash echo Lihat user, masukan username tanpa domain read mail a=`/usr/local/bin/ezmlm/ezmlm-list /home/vpopmail/domains/domai.com/staff | grep $mail | sort ` for x1 in $a ; do echo staff $x1 done
But I dont know where should I put 'wc -l' to know total of members.. Any idea ? Is there any other way beside using wc -l ?
regards,
-- Arie Reynaldi Zanahar reymanx at gmail.com http://www.reynaldi.or.id
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
"You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions." � Naguib Mahfouz
__________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com
-- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
"You can tell whether a man is clever by his answers. You can tell whether a man is wise by his questions." � Naguib Mahfouz
__________________________________ Yahoo! Music Unlimited Access over 1 million songs. Try it free. http://music.yahoo.com/unlimited/