Finding duplicate lines in a CSV file
<p>I'm trying to use Powershell to search a csv file and output a list of duplicate lines in a csv file. I can accomplish this pretty easily in bash with the following:</p>

<pre><code>uniq -d myfile.csv &gt; list.csv
</code></pre>

<p>In Powershell I can output a list of unique lines but how do I modify <code>Get-Unique</code> to display only the duplicate lines like I did in bash? </p>

<pre><code>Get-Content c:\file\myfile.csv | Get-Unique | Set-Content c:\file\list1.csv
</code></pre>