Skip to content

Instantly share code, notes, and snippets.

@cyklee
Created July 28, 2018 00:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save cyklee/efe58bec110295ea3b9e2ca99aa1e615 to your computer and use it in GitHub Desktop.
Save cyklee/efe58bec110295ea3b9e2ca99aa1e615 to your computer and use it in GitHub Desktop.
awk one-liner to extract an entry from multifasta file with linebreaks
awk -v seq="header_id" -v RS='>' '$1 == seq {print RS $0}' file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment