Hi, I&#39;m confused about the usage of &#39;awk&#39; in ipython.<br><br><pre class="default prettyprint"><code><span class="pln">For example: I want to create 3 files(&#39;chr1&#39;,&#39;chr2&#39;,&#39;chr3&#39;). And I input the following commands:<br>
a=[&#39;chr1&#39;,&#39;chr2&#39;,&#39;chr3&#39;]<br>for eachitem in a:<br>    !awk &#39;{print $1}&#39; &#39;/home/ckivip/Epigenetics/Data/H1hesc/Dnamethy.bed&#39; &gt; &#39;/home/ckivip/Epigenetics/Data/H1hesc/Dnamethy/$$eachitem&#39;<br>
<br>However, I only get files named &#39;16484eachitem&#39;,&#39;16486eachitem&#39;,&#39;16488eachitem&#39;!! What do those mean?<br>And my question is how can I convert variables to shell from python in this situation. it can&#39;t recognize <br>
the variable &#39;$$eachitem&#39;. So how can I deal with it?<br><br><br></span></code></pre><br>-- <br>Peng Cui<br><font face="Verdana"><font face="Verdana"><span>Department of Bioinformatics &amp; Biostatistics, Shanghai Jiao Tong University</span></font></font><br>
<font face="Verdana"><font face="Verdana"><span>800 Dongchuan 
Road<span>,</span>Shanghai 200240<span>,</span>China</span></font></font><br><br>