A
AyOut
I'm new to perl and have the following line that I try to execute:
....
my $hm = `date +%H:%M --date "1 minute ago"`;
my $fname = `date +AppName_stats.log.%Y-%m-%d --date "1 days ago"`;
my $hits = `find /logs/server_name0?/dir/. -name "$fname*" -exec
gunzip -c {} ;\ | /grep SearchStr | /bin/awk -F","
'{if(substr($1,12,5)~hmpoint)print $3}' hmpoint=$hm | /bin/awk '{tot+=
$1}END{print tot}'`;
When I run this I get all kinds of complaints on the $hits line. I've
tried various modifications, but can't seem to get it to work. Any
idea of what's wrong here?
Thanks.
....
my $hm = `date +%H:%M --date "1 minute ago"`;
my $fname = `date +AppName_stats.log.%Y-%m-%d --date "1 days ago"`;
my $hits = `find /logs/server_name0?/dir/. -name "$fname*" -exec
gunzip -c {} ;\ | /grep SearchStr | /bin/awk -F","
'{if(substr($1,12,5)~hmpoint)print $3}' hmpoint=$hm | /bin/awk '{tot+=
$1}END{print tot}'`;
When I run this I get all kinds of complaints on the $hits line. I've
tried various modifications, but can't seem to get it to work. Any
idea of what's wrong here?
Thanks.