Quantcast
Channel: Active questions tagged powershell-3.0 - Stack Overflow
Viewing all articles
Browse latest Browse all 123

How to delete all lines AFTER and INCLUDING a certain string?

$
0
0

I have a need to delete all lines in a csv AFTER and INCLUDING a certain string. The string is as follows :

S_Channel_Alt_View

enter image description here

The file should then look like this

enter image description here

I've tried to set something up using Compare-Object but unable to get it to work.

Thank you!


Viewing all articles
Browse latest Browse all 123

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>