Thank you very much for reply
From that link,
First solution doesn't work. It doesn't give any output. awk -F '|' '/^>/ {F=sprintf("%s.fasta",$2); print > F;next;} {print >> F;}' <file name<="" p="">
Second script works but it give file names include (">"). That I don't want. awk -F "|" '/^>/ {close(F) ; F = $1".fasta"} {print >> F}' yourfile.fa