edit text file
2
0
Entering edit mode
7.1 years ago
Sam ▴ 150

How I can convert this text file ?

Thanks

AKT3
BCL2L11
EGFR
EIF4E
EIF4EBP1
ERBB2
AKT1
FGF2

convert to:

AKT3, BCL2L11, EGFR, EIF4EBP1, ERBB2, AKT1, FGF2
bash awk • 1.1k views
ADD COMMENT
2
Entering edit mode
7.1 years ago
tr "\n" , < foo.txt  | sed -e "s/,/, /g; s/, $/\n/"

I'm assuming your lines don't already have a space at the end. If they do, you can omit the s/,/, /g;.

ADD COMMENT
2
Entering edit mode
7.1 years ago
venu 7.1k

Like this

ADD COMMENT

Login before adding your answer.

Traffic: 1730 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6