Searching log files for rows containing specific dates and values.
i have log file rows of text in same format.
eg
ddmmyyyy x aaaa ......
ddmmyyyy x aaaa ......
ddmmyyyy x pppp ......
i want through text file , search rows current date , copy rows specific values in column (copy pppp).
i have been using 'select-string' select date cant search 2nd condition. have been playing using 'split' command split columns yet working together.
can advise please?
it's not a comma, it's dot.
, . - big difference in regex.
use this:
$pat = "$now.+pppp"
not:
$pat = "$now,+pppp"
([string](0..9|%{[char][int](32+("39826578846355658268").substring(($_*2),2))})).replace(' ','')
what's new in powershell 3.0 (technet wiki)
Windows Server > Windows PowerShell
Comments
Post a Comment