Hello, I am trying to sort some lines by number but I am failing...maybe it is the wrong approach but I almost did it and then I failed at the LAST step so maybe we need a "sort by prefix" option in table processing?
these are some example lines I have:
9a0421qq127a113b91w16
00201711849281aabui8o
0206601105825ra33abha
2101502164003opc4axba
012924162210a8lb42x5a
260762701312raa2y2haz
300aak3r2110k02080993
2000815118415la0nawfo
8010121524034a2rash2u
21000622121240acob0pa
01203181003244oaa9gz9
1002298080330u69aow8a
These lines are identifiers and NEVER change and I want to give different priority to them.
I put the lines in a table and then I add some (changing) prefixes, the prefixes change as the template progresses, for instance I end up with some priorities like this:
12:8010121524034a2rash2u
2:00201711849281aabui8o
1234:300aak3r2110k02080993
11:2101502164003opc4axba
0:21000622121240acob0pa
0:9a0421qq127a113b91w16
9:1002298080330u69aow8a
4:260762701312raa2y2haz
12:8010121524034a2rash2u
0:21000622121240acob0pa
120:012924162210a8lb42x5a
8:0206601105825ra33abha
for instance the line 1234:300aak3r2110k02080993 has the 1234 at the start and so I want it to be lowest priority and I want it to go to the bottom of the pile.
I then try and put them in numerical order, lowest numbers at the top (I create a list, bind the file to it and then use the "sort" option in list processing) by the prefix hoping for a result like this:
0:9a0421qq127a113b91w16
0:21000622121240acob0pa
0:21000622121240acob0pa
2:00201711849281aabui8o
4:260762701312raa2y2haz
8:0206601105825ra33abha
9:1002298080330u69aow8a
11:2101502164003opc4axba
12:8010121524034a2rash2u
12:8010121524034a2rash2u
120:012924162210a8lb42x5a
1234:300aak3r2110k02080993
and this is where I of course fail.
It is obvious that for the purpose of numerically sorting, the sorting option should only consider "numbers" up to the : and discard what is after.
So how can I do this? Is it even possible?
these are some example lines I have:
9a0421qq127a113b91w16
00201711849281aabui8o
0206601105825ra33abha
2101502164003opc4axba
012924162210a8lb42x5a
260762701312raa2y2haz
300aak3r2110k02080993
2000815118415la0nawfo
8010121524034a2rash2u
21000622121240acob0pa
01203181003244oaa9gz9
1002298080330u69aow8a
These lines are identifiers and NEVER change and I want to give different priority to them.
I put the lines in a table and then I add some (changing) prefixes, the prefixes change as the template progresses, for instance I end up with some priorities like this:
12:8010121524034a2rash2u
2:00201711849281aabui8o
1234:300aak3r2110k02080993
11:2101502164003opc4axba
0:21000622121240acob0pa
0:9a0421qq127a113b91w16
9:1002298080330u69aow8a
4:260762701312raa2y2haz
12:8010121524034a2rash2u
0:21000622121240acob0pa
120:012924162210a8lb42x5a
8:0206601105825ra33abha
for instance the line 1234:300aak3r2110k02080993 has the 1234 at the start and so I want it to be lowest priority and I want it to go to the bottom of the pile.
I then try and put them in numerical order, lowest numbers at the top (I create a list, bind the file to it and then use the "sort" option in list processing) by the prefix hoping for a result like this:
0:9a0421qq127a113b91w16
0:21000622121240acob0pa
0:21000622121240acob0pa
2:00201711849281aabui8o
4:260762701312raa2y2haz
8:0206601105825ra33abha
9:1002298080330u69aow8a
11:2101502164003opc4axba
12:8010121524034a2rash2u
12:8010121524034a2rash2u
120:012924162210a8lb42x5a
1234:300aak3r2110k02080993
and this is where I of course fail.
It is obvious that for the purpose of numerically sorting, the sorting option should only consider "numbers" up to the : and discard what is after.
So how can I do this? Is it even possible?