使用PowerShell过滤csv文件中的特定值

时间:2017-10-03 07:57:56

标签: powershell csv

我在从csv文件中过滤特定值时遇到问题。 csv文件如下所示:

"1","19/Oct/2016","15:03:58","19/Oct/2014","15:03:58","0:00:00","---","---","nice_meme@help.com","---","sip","1232Kbps","---","Out","1140","1","---","---","---","user:---","---","---","---","---","---","---","---","Failed Attempt; ""Your call could not be completedOver.""","3","---","---","---","---","---","---","---","---","---","---","---","---","---"

正如您所看到的有多个值' ---',我尝试了很多方法来删除这三个破折号。我不知道如何使用PowerShell过滤掉它们。我想获得不等于三个破折号的行。

这样的事情:

$a = Import-CSV -Path "C:\Transformed\test.csv" | Where-Object {$_.Header -neq "---"}

0 个答案:

没有答案