BedTotalSize: Difference between revisions
From genomewiki
Jump to navigationJump to search
No edit summary |
(deleted the useless python thing, hiram's version if of course better and faster as well) |
||
Line 1: | Line 1: | ||
you can do this in awk with the single line statement: | |||
<pre> | <pre> | ||
awk '{sum += $3-$2}END{printf "total size: %d\n",sum}' file.bed | |||
</pre> | </pre> | ||
[[Category:User Developed Scripts]] | [[Category:User Developed Scripts]] |
Latest revision as of 09:16, 15 September 2006
you can do this in awk with the single line statement:
awk '{sum += $3-$2}END{printf "total size: %d\n",sum}' file.bed