I have a text file containing hundreds of lines of text containing database information.
I am trying to extract DatabaseId for any database that is 35 GB.
I would like to poll the file using Powershell and create a text file containing all the relevant databases.
So basically, I would like to scan the file, find DatabaseSize , which is 35, and then extract the corresponding DatabaseId from the previous three lines.
I looked through the entire network, but I can not find anything that can do this.
Example of extracting a text file:
ServerId = VMlinux-b71655e1 DatabaseId = db-ecb2e784 Status = completed LocationId = 344067960796 DatabaseSize = 30 ServerId = VMlinux-0db8d45b DatabaseId = db-cea2f7a6 Status = completed LocationId = 344067960796 DatabaseSize = 35 ServerId = VMlinux-c5388693 DatabaseId = db-9a421bf2 Status = completed LocationId = 344067960796 DatabaseSize = 8 etc
source share