nvn,
I've been trying to learn awk, but I still have some questions.
awk '{if(/^>/){close(file1);file1="db01/"substr($1,2)};
print $0 > file1}' m.txt
I read this as: if a line matches ">" at the top, then close file 1 where file1="db01/"substr($1,2). Then, print the current record to file...