Entering edit mode
6.7 years ago
gsk1185
▴
20
I Have a file Like This
chr1 11873,12612,13220, 12227,12721,14409,
chr1 14361,14969,15795,16606, 14829,15038,15947,16765,
chr1 69090, 70008,
Want to convert it into file like this
chr1 11873 12227
chr1 12612 12721
chr1 13220 14409
chr1 14361 14829
chr1 14969 15038
chr1 15795 15947
chr1 16606 16765
chr1 69090 70008
Any Awk or cut command i can use here to get the output?
I added code markup to your post for increased readability. You can do this by selecting the text and clicking the 101010 button. When you compose or edit a post that button is in your toolbar, see image below:
Also, please select sensible tags. These are meaningless.
Finally: it's hugely appreciated if you show your own effort when asking questions. Don't make us give you a full solution without working on this yourself.
I can't quite work out what the 'rules' you're trying to apply are.. do you just want the string
chr1
inserted before each pair of numbers? Though it looks like some numbers need to be dropped and not others.Sorry, text output looking weird . Not looking like what i want. So i have one file having three coloumns.
want in format like Three coloumns