# $Header: allusers.pl 25-jun-2002.09:47:18 xxu Exp $ # # Copyright (c) 2002, 2003, Oracle Corporation. All rights reserved. # # NAME # allusers.pl # # DESCRIPTION # Number of logins for all logged on users # # MODIFIED (MM/DD/YY) # xxu 06/25/02 - remove /usr/local/bin/perl # # 1 NKJ: Copied from users.pl # $ENV{PATH} = "/usr/bin:/usr/sbin:/usr/ucb"; @DATA = `w -h`; for $userline (@DATA) { $userline =~ s/\W.*//; #get rid of everything after first word chomp($userline); $usercount{$userline} += 1; # print "$dataline : $usercount{$dataline}\n" } foreach $user (sort keys (%usercount)) { $count = $usercount{$user}; print "em_result=$user=$count\n"; }