Hi,
I am trying to search for a pattern in a file in my perl script.
Syntax used is :
system("grep \"$res\" ${data_dir}/${node}.load >
/tmp/${day[0]}.${day[1]}.${day[2]}.${node}.log");
But the grep command is'nt successful in getting the desired string.
Am I missing anything here ?
Rajini
Rajini Naidu wrote:
Hi,
Hello,
I am trying to search for a pattern in a file in my perl script.
Syntax used is :
system("grep \"$res\" ${data_dir}/${node}.load >
/tmp/${day[0]}.${day[1]}.${day[2]}.${node}.log");
But the grep command is'nt successful in getting the desired string.
Am I miss
Thanks John for the reply.
I included the code as you suggested, but does'nt seem to work.
The output file is empty.
-rajini
On Wed, Mar 25, 2009 at 12:19 AM, John W. Krahn wrote:
> Rajini Naidu wrote:
>
>> Hi,
>>
>
> Hello,
>
>
> I am trying to search for a pattern in a file in my pe
On Tue, Mar 24, 2009 at 19:50, Rajini Naidu wrote:
snip
>> open my $IN, '<', "$data_dir/$node.load" or die "Cannot open
>> '$data_dir/$node.load' $!";
>> open my $OUT, '>', "/tmp/$day[0].$day[1].$day[2].$node.log" or die "Cannot
>> open '/tmp/$day[0].$day[1].$day[2].$node.log' $!";
>>
>> while (