iowaprogrammer
ISP
When I run this code on a linux machine I have no problems; but when done on a Solaris 10 machine I receive the following message back.
Message:
sh: [A-F0-9]: not found
Usage: grep -hblcnsviw pattern file . . .
Code:
#!/usr/bin/perl
my $CHECK = 'mailq|grep ^[A-F0-9]|cut -c 42-80|sort |uniq -c|sort -n|tail > /tmp/qResults';
#create list of top sender emails in the queue
if ( system($CHECK) !=0) {
die "Error excuting $CHECK: error " .
"code " . ($?/256) . "\n";
}
Could someone offer some code to fix this problem.
Message:
sh: [A-F0-9]: not found
Usage: grep -hblcnsviw pattern file . . .
Code:
#!/usr/bin/perl
my $CHECK = 'mailq|grep ^[A-F0-9]|cut -c 42-80|sort |uniq -c|sort -n|tail > /tmp/qResults';
#create list of top sender emails in the queue
if ( system($CHECK) !=0) {
die "Error excuting $CHECK: error " .
"code " . ($?/256) . "\n";
}
Could someone offer some code to fix this problem.