mirror of
https://github.com/Cacti/cacti.git
synced 2026-11-09 22:13:05 +09:00
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@733 860744bd-22fc-0310-8c96-e9fe5004b5ca
15 lines
228 B
Perl
15 lines
228 B
Perl
#!/usr/bin/perl
|
|
|
|
my $grep_string = $ARGV[0];
|
|
|
|
chomp $grep_string;
|
|
|
|
if ($grep_string eq '') {
|
|
$output = `who | grep -c :`;
|
|
}else{
|
|
$output = `who | grep : | grep -c $grep_string`;
|
|
}
|
|
|
|
chomp($output);
|
|
print $output;
|