I have a huge (ca. 20G) text file which contains millions of passages (a.k.a. paragraphs) with headers. Headers and paragraphs are always one line each, e.g.,
Sunshine
This is a sunny day.
Darkness
A cave is a dark place.
What I try to come up with is a terminal command which goes through the text and adds a '>' in front of every header, i.e., every odd-numbered line (lines 1, 3, 5, …), e.g.,
>Sunshine
This is a sunny day.
>Darkness
A cave is a dark place.
Any ideas?
If this is relevant: the above text was just an example. Most of the headers are MD5s, followed by a DNA sequence ('paragraph'), e.g.,
0002ebd9ca12d6b69dfc3066356fc299
CATTAACCATTGGATACCTTCGGGTATATCCCATCCGTGTCTACATACTCTTGTTGCTTTGGCAGGCCGTGGTCACACACTGTGGGCTATGCCTGCATGTGCCTGCCAGAGGACCA
… which I'm trying to convert to
>0002ebd9ca12d6b69dfc3066356fc299
CATTAACCATTGGATACCTTCGGGTATATCCCATCCGTGTCTACATACTCTTGTTGCTTTGGCAGGCCGTGGTCACACACTGTGGGCTATGCCTGCATGTGCCTGCCAGAGGACCA
>
is added as the 2nd character of your examples. Can you clarify where you want it and also, are the single quotes in your examples part of the text file or just a formatting slip-up in your post?