Which I do not want.
So how can I add a "\n" before ">" and after "my lines"
how can read the next line and check if ">" occurs if so need to add "\n" to the end of current line.
Will awk be faster or PERL is the way to go as the file is huge. Thousands of line and more.
One of the programs in perl using arrays went out of memory :(,
so need to read and print line by line rather than buffer first.
There are no arrays involved here. I tested it on a dummy file that has 250,000 "FASTA Headers" and 4 lines under each FASTA header. So that's 1,250,000 lines in all.
As I was getting a extra newline at the first read of header. Of course I use 'tail' to get rid of it. But than again, wanted to get it right with Awk. Perl, Sed and bash codes are good too (just need to modify a bit). Thanks again for all the input and quick answers.