How to correctly pipe commands in Cygwin (Using Windows)?
<p>I'm trying to run experiments on a text file to get word frequencies. I tried using the following command:</p>

<pre><code>gawk -F"[ ,'\".]" -v RS="" '{for(i=1;i&lt;=NF;i++) words[$i]++;}END{for (i in words) print words[i]" "i}' myfile.txt | uniq -c | sort -nr | head  -10
</code></pre>

<p>But I get the following error:</p>

<pre><code>gawk: cmd. line:1: fatal: cannot open file '|' for reading (No such file or directory)
</code></pre>

<p>I read somewhere that ';' may be used instead of '|' on Windows machines, although this results in a similar error.</p>

<p>It seems as though it is reading the first instance of '|' as a file name. Is this the correct way of piping on a windows machine? Is piping possible on a windows machine using Cygwin?</p>

<p>EDIT: I added cygwin to windows PATH variable and then used cmd window. If i wanted to actually use cygwin.exe, does that mean I would have to place any files I wanted to edit within C:/cygwin ?</p>