Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 27 You must be signed in to star a gist
  • Fork 5 You must be signed in to fork a gist
  • Save astatham/621901 to your computer and use it in GitHub Desktop.
Save astatham/621901 to your computer and use it in GitHub Desktop.
cat hg18.fa | awk '{
if (substr($0, 1, 1)==">") {filename=(substr($0,2) ".fa")}
print $0 > filename
}'
@diegogarciamartinezdeartola

I got a problem bc "File name too long" after the "> entry". Is there any easy way to shorten this names? TYIA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment