Transpose a sequence of symbols from row to one columns (no separators))

Hi all,

I have a data file. It contains one header line followed by a new line which is one row of different characters without separators (charahters can be dots, dash, capital and small letters). What I need is ignoring header line to transpose these characters so they form a column. So, from this:

>HEADER
......................................ATCTabssdfjjdfFJKSHHA----LIJUOSasjdhjskdhflaiwekfJDHFHBLKSHJNLMLKDJLJLKSMLSKDFHJERJEI

I need to make this:

>XXXX
.
.
.
.
.
.
.
.
.
.
.
A
T
C
T 

Thank you!!

Try:

sed '/>/!s/./&\
/g' file

or with GNU sed:

sed '/>/!s/./&\n/g file
1 Like
sed '2,$s/./&\n/g' file
1 Like

Thank you a lot, Scrutinizer and rdrtx1, for ur quick help!!

good day!

echo $YourData | sed 's/./\0\n/g'