I´d like to use PS to scan some log files for errors
select-string -pattern '[E]' -path D:\15\s\BAS\VectorNetworkAnalysis.AutomationInterfaceTests\Tests\COMTesting\PythonUnitTests\PyTestsResult*.log
but despite there are NO ERRORS PS lists every line of the logs as a hit, at least the ones containing "[i]". I tried different variations, with double apostrophes, blanks before/after the [E] and intentionally added one single line containing "[E]" but either I´getting a bunch of lines or none.
Any hint? Thanks a lot.
here is an example of log including the line with the INTENTIONALLY ADDED [E]
2022-03-04 09:22:26 [i] Transmission: Execution State is OK!
2022-03-04 09:22:26 [i] User range calib state is active!
2022-03-04 09:22:28 [i] **** Starting Save/Load calibration test ****
2022-03-04 09:22:29 [i] Transmission: Execution State is OK!
2022-03-04 09:22:29 [i] User range calib was saved!
2022-03-04 09:22:29 [i] User range calib was loaded!
2022-03-04 09:22:31 [i] **** Starting S11 one port meas test ****
2022-03-04 09:26:04 [i] S11OnePortMeas: Execution State is OK!
2022-03-04 09:26:04 [i] S11OnePortMeas: Number of results is OK!
2022-03-04 09:26:05 [E] **** Starting Impedance one port meas test ****
2022-03-04 09:26:06 [i] OnePortMeas: Execution State is OK!