K
king
Suppose a batch file contains something like (some 250 lines like this)
REM //// TEST PCIE LINK ////
Win32 pd k0018f00 > test.log
fc /l good1.log test.log > comp.log
find "no differences encountered" comp.log
if errorlevel 1 goto end
echo Passed XV_UP test.
del test.log
del comp.log
I have written a perl script to edit some of the lines.
My script is
open my $F, '<', $file || die "Cant open $file: $!";
flock($F, 1) || die "Cant get LOCK_SH on $file: $!";
while(<$F>)
{
$line_counter ++;
if ($line_counter == 15)
{
&SUB_Link;
}
sub SUB_Link
{
if($_=~/k......./i)
{
s/k......./$any variable;
}
}
close $F || die "Cant close $file: $!";
}
but htis is not working
can anybody suggest something.
REM //// TEST PCIE LINK ////
Win32 pd k0018f00 > test.log
fc /l good1.log test.log > comp.log
find "no differences encountered" comp.log
if errorlevel 1 goto end
echo Passed XV_UP test.
del test.log
del comp.log
I have written a perl script to edit some of the lines.
My script is
open my $F, '<', $file || die "Cant open $file: $!";
flock($F, 1) || die "Cant get LOCK_SH on $file: $!";
while(<$F>)
{
$line_counter ++;
if ($line_counter == 15)
{
&SUB_Link;
}
sub SUB_Link
{
if($_=~/k......./i)
{
s/k......./$any variable;
}
}
close $F || die "Cant close $file: $!";
}
but htis is not working
can anybody suggest something.