I would like to know how I can sort the rows of a file in the following way:
My file is file.txt (tab delimited):
g1: 00A98_01563 00554_01552 CCUG38_01373
d2: 00554_01444
g3_3: 00A98_04566 CCUG38_05322
I want to get this (tab delimited):
00A98 00554 CCUG38
g1 1 1 1
d2 0 1 0
g3_3 1 0 1
How can I do it with the command line?
All the best, Regards
I think this will be quite cumbersome on the commandline alone I think. This is a task for python or R really.