将fasta文件线性化处理
awk '/^>/ {printf("%s%s ",(N>0?"
":""),$0);N++;next;} {printf("%s",$0);} END {printf("
");}' < input.fa
cat Rmh.fasta | awk '{printf("%s%s",$0,((NR+1)%2==1?"
":" "));}' | less -S
curl -s "ftp://ftp.uniprot.org/pub/databases/uniprot/current_release/knowledgebase/complete/uniprot_sprot.fasta.gz" | gunzip -c | awk '/^>/ {printf("%s%s ",(N>0?"
":""),$0);N++;next;} {printf("%s",$0);} END {printf("
");}' | less -S
cat input.fasta | paste - - | less -S
将fastq文件线性化处理
cat Rmh.fastq | awk '{printf("%s%s",$0,((NR+1)%4==1?"
":" "));}' | less -S
cat input.fastq | paste - - - - | less -S