perl -pe 'chomp unless /^>/; print "\n" if /^>/ and $. > 1' < File1
Возможно, вам потребуется добавить последний символ новой строки.
Решение awk
:
awk '/^>/{if(FNR>1)printf "\n";print;next};{printf "%s", $0}' file
Решение perl
, как @choroba's answer, но обработка последней строки:
perl -pe 'chomp unless /^>/ or eof;print "\n" if /^>/ and $. > 1' file