Hi,
I've exported my Windows Services to a txt file. The header is
Name Description Status Startup Type Log On As
which is delimitted by tabs.
I only want the "name" and the "status" (for the entire services in my txt file). I was trying to get the "name", then try to figure out how to tab over and split the line to get the "status" but I get the entire line.
#!/usr/bin/perl
open (filein, "services.txt");
while ($line1=<filein>)
{
if ($line1 =~ /\t/)
{
($trash,$line) = split("/\t/",$line1);
# print "\n",$line1,"\n";
}
}
Thanks
I've exported my Windows Services to a txt file. The header is
Name Description Status Startup Type Log On As
which is delimitted by tabs.
I only want the "name" and the "status" (for the entire services in my txt file). I was trying to get the "name", then try to figure out how to tab over and split the line to get the "status" but I get the entire line.
#!/usr/bin/perl
open (filein, "services.txt");
while ($line1=<filein>)
{
if ($line1 =~ /\t/)
{
($trash,$line) = split("/\t/",$line1);
# print "\n",$line1,"\n";
}
}
Thanks