Skip to content

Instantly share code, notes, and snippets.

@mariokostelac
Created September 4, 2015 14:23
Show Gist options
  • Save mariokostelac/d46b04c7a0ab946883b6 to your computer and use it in GitHub Desktop.
Save mariokostelac/d46b04c7a0ab946883b6 to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
output_dir=${1-.}
DONE=false
i=0
until $DONE; do
read header || DONE=true
read seq || DONE=true
echo $header > $output_dir/$i.fasta
echo $seq >> $output_dir/$i.fasta
i=$(($i+1))
done;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment