Hi,
I am having problem of searching for some specific values from a columns in a tsv file:
This is a example of the tsv file. "(PDH-TSV 4.0) (Eastern Standard Time)(300)" "\\xxxxx\Memory\% Committed Bytes In Use" "\\xxxxx\Memory\Available MBytes" "\\xxxxx\Memory\Free System Page Table Entries" "\\xxxxx\Memory\Pool Paged Bytes" "02/26/2010 17:03:01.094" "4.9980826913423728" "2495" "191430" "72187904" "02/26/2010 17:13:01.113" "4.3538558027374465" "2529" "191766" "69058560" "02/26/2010 17:23:01.152" "4.3622405344763404" "2529" "191782" "69058560"
As you can see, there are five columns and are separated by "tab". The first column has no interest, as it only display the time. I need a script that can read those columns and search for specific number. Let say, in column 2 i want to search for number that is greater than 4.7. If matches, I need it to write the column's header, the time, and the exact values into a txt file. and, similar for the other columns.
This is what I got as starting point, PS C:\> Import-tsv c:\logs\MB.tsv -header ("\\xxxxx\Memory\% Committed Bytes In Use", "\\xxxxx\Memory\Available MBytes")...... |foreach { search for number and display to |out-file -append c:\logs\MB_found.txt }
Thanks
|