The code I need to implement in a Windows batch file is like this (it is currently in Perl):
while(<file>)
{
if($_ =~ m/xxxx/)
{
print OUT "xxxx is found";
}
elsif($_ =~ m/yyyy/)
{
next;
}
else
{
($a,$b) = split(/:/,$_);
$array1[$count] = $a;
$array2[$count] = $b;
$count++;
}
}
How can I put an If condition inside a for loop to read a text file using a batch script file?
I am working in Windows. I can use only whatever is provided with Windows by default and that means I cant use Unix utilities.