Hi All
im just looking for some confirmation on how the select-string command works and also on the logic behind piping data along the pipeline
im running the following command:
select-string -pattern 'violation of primary key' -path c:\temp\psproject\*.* | out-file -filepath c:\temp\psproject\output.txt
my output.txt returns the data i want but my end goal is to delete that data from the log files in c:\temp\psproject
my question is as follows, can i pipe my results from my first cmdlet to the pipeline and then have a second cmdlet delete those results from the source file( a bit like a textpad editor would do)
im not even sure a cmdlet exists that would remove that data like i wanted to do but i was just looking for confirmation that this would be possible to do or not without the use of variables(still a beginner in powershell
thanks for reading me