note
talexb
<ul><c>
cat input_file.fq | \
perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' > output.txt
</c></ul>
<p>
Just a stylistic note, but this can be restated as the following:
</p>
<ul><c>
perl -ne '$s=<>;<>;<>;chomp($s);print length($s)."\n";' \
<input_file.fq >output.txt
</c></ul>
<p>Unless I'm dumping the contents of a file to the console, I don't use <c>cat</c> that much .. <c>head</c>, <c>tail</c> and <c>less</c> are handier.
</p>
<div class="pmsig"><div class="pmsig-131279">
<p>Alex / [talexb] / Toronto</p>
<p><small>"<a href="http://www.groklaw.net">Groklaw</a> is the open-source mentality applied to legal research" ~ Linus Torvalds</small></p>
</div></div>
1014740
1014740