Quantcast
Channel: UNIX and Linux Forums
Viewing all articles
Browse latest Browse all 16232

Help with replace comma with new line and repeat the content

$
0
0
Input file
Code:

G      A
G      A,T
A      C
A      G,T,C
T      C
.
.

Desired Output file
Code:

G      A
G      A
G      T
A      C
A      G
A      T
A      C
T      C
.
.

Do anybody know how to replace "," in column 2 with newline and repeat the column 1 content at the same time?

Thanks for any advice.

Viewing all articles
Browse latest Browse all 16232

Trending Articles