I would like to relocate strings based on the index number.
Index numbers are shown on the first column, the strings are shown on the second column.
1 path_sparc_ifu_dec_104
1 path_sparc_ifu_dec_105
2 path_sparc_ifu_dec_63
2 path_sparc_ifu_dec_92
3 path_sparc_ifu_dec_39
4 path_sparc_ifu_dec_43
4 path_sparc_ifu_dec_71
5 path_sparc_ifu_dec_103
6 path_sparc_ifu_dec_99
7 path_sparc_ifu_dec_55
7 path_sparc_ifu_dec_75
7 path_sparc_ifu_dec_93
If the index number is 1, corresponding strings are placed on the first row. On the same time, the index number is removed.
The desired output is:
path_sparc_ifu_dec_104 path_sparc_ifu_dec_105
path_sparc_ifu_dec_63 path_sparc_ifu_dec_92
path_sparc_ifu_dec_39
path_sparc_ifu_dec_43 path_sparc_ifu_dec_71
path_sparc_ifu_dec_103
path_sparc_ifu_dec_99
path_sparc_ifu_dec_55 path_sparc_ifu_dec_75 path_sparc_ifu_dec_93
I think awk/sed can read the file column by column and relocate the strings, but I need help!
I would appreciate any help for this problem.
Best,
Jaeyoung