Skip to content

Instantly share code, notes, and snippets.

@danielecook
Forked from maneeshi/gist:412ef98ab0fba2ac4d0c
Last active February 22, 2017 10:40
Show Gist options
  • Save danielecook/394958db37c4d01f0ef3 to your computer and use it in GitHub Desktop.
Save danielecook/394958db37c4d01f0ef3 to your computer and use it in GitHub Desktop.
Generate Fasta sequence lengths
cat file.fa | awk '$0 ~ ">" {print c; c=0;printf substr($0,2,100) "\t"; } $0 !~ ">" {c+=length($0);} END { print c; }'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment