perl -e 'open(W,"w -h|");
while(<W>){$i++}
close(W);
print("there are $i users logged on\n")'
or
perl -e 'open(W,"w -h|");
@w=<W>;
close(W);
print("there are ".scalar(@w)." users logged on\n")'
or look at www.cpan.org and see if there's a module for it...
kevin
--
kevin at suberic.net "we were goin' for breakfast. in canada. we
fork()'ed on 37058400 made a deal: if she'd stop hookin', i'd stop
meatspace place: home shootin' people. maybe we were aiming high."
--porter, "payback"
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!