Skip to content

Instantly share code, notes, and snippets.

@wakuteka
Created March 3, 2011 01:21
Show Gist options
  • Save wakuteka/852135 to your computer and use it in GitHub Desktop.
Save wakuteka/852135 to your computer and use it in GitHub Desktop.
d]$ cat *.fa |awk '{if($1!~/^>/)sum+=length}END{print sum}' 173499994 count base pair
#!/bin/awk
BEGIN {
}
{
if($1!~/^>/)
{
sum += length
}
}
END {
print sum, FILENAME
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment