SLPowers
asked on
Look for a word in a CSV and remove everything under it using powershell
I have a line in a csv called examples.
I want to remove that line and every line under it using powershell.
What is the best way to accomplish this?
Thanks
I want to remove that line and every line under it using powershell.
What is the best way to accomplish this?
Thanks
ASKER
Thanks so much for the fast reply. I am sorry for my poorly worded question.
I have a large CSV file. Somewhere down the file will be a Row and in column A row (something) the word "Examples" will be there.
I want to delete the word examples and every row below that.
Thanks again
I have a large CSV file. Somewhere down the file will be a Row and in column A row (something) the word "Examples" will be there.
I want to delete the word examples and every row below that.
Thanks again
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Worked perfectly!
Thanks
Thanks
I'm leaning towards the former, so try this:
Open in new window
If the latter: is "the line" a regular csv line, and how do you want to identify the line in question; as the full text line, as part of a text line, as properties of the csv columns, ...?