in reply to Re: Extract field after keyword
in thread Extract field after keyword
All the code follows:Report on Used Media Cell Manager: Trinity.mydomain.com Creation Date: 3/19/2004 10:05:17 AM Label Location Pool Name Protection Used [MB] + Total [MB] Last Used [NFK100L2] [MSL6000 Trinity: 7] MSL6000 None + 0.06 204800.00 3/19/2004 10:04:2
#$slotnumber=0; $dpdrivloc = "Trinity"; open(DPSLOTFILE, "< c:\\test.txt") or die "Can't open test.txt: $!"; while (<DPSLOTFILE>) { if (/$dpdrivloc:\s*(\d+)/) { print "Slot for today is: $1\n"; } } #system("c:\\ipbat.bat"); close DPSLOTFILE;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Re: Re: Extract field after keyword
by Not_a_Number (Prior) on Mar 19, 2004 at 20:54 UTC | |
by jamen_98 (Initiate) on Mar 19, 2004 at 21:08 UTC |