magarena/scripts/split_cards.awk

14 lines
153 B
Awk

/^>/ {
gsub(">","")
name = $0
fn = gensub("[^A-Za-z]", "_", "g", name) ".txt";
print ">" name >> fn
next
}
{
print $0 >> fn
}