awk: awk ‘/^>/&&NR>1{print "";}{ printf "%s",/^>/ ? $0" ":$0 }‘ YourFile sed: sed -n ‘1{x;d;x};${H;x;s/\n/ /1;s/\n//g;p;b};/^>/{x;s/\n/ /1;s/\n//g;p;b};H‘ YourFile
【awk】用awk将Fasta文件序列变成一行
原文:https://www.cnblogs.com/muuyouzhi/p/9633185.html