Files
cacti/scripts/unix_users.pl
T
Ian Berry aace2d1810 prevent output of newlines from scripts
git-svn-id: svn+ssh://repo.cacti.net/var/data/svnroot/cacti/trunk/cacti@733 860744bd-22fc-0310-8c96-e9fe5004b5ca
2003-03-21 05:12:41 +00:00

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;