file1.fa in the format as below:
>XXX[YY] ZZZZZZ>XXX[YY] ZZZZZZ>XXX[YY] ZZZZZZ
I was trying to add a new lines before the forward arrow using sed command but it doesn't work.
sed 's/ \?\>/ \n\>/g' file1.fa > file2.fa
The desired file format:
>XXX[YY] ZZZZZZ >XXX[YY] ZZZZZZ >XXX[YY] ZZZZZZ
I have tried it with other characters and the script working just fine.
I wonder if there happened to be any restriction that I have to include when dealing with the forward arrow in sed? Or anybody know what is going wrong here?