samintz
Scott Mintz
- May
- 1,590
- 27
Is there a way to sort a file, starting at a specific column, where that column is a hexadecimal value?
I have a symbol file that is out of order and very hard to find anything. I want to sort the file so the symbols are listed in increasing numeric order. I am currently using the SORT program that's built in to Windows, however it does a character sort and not a numeric sort so the value of 0xfc would come after 0xfb001234 which is not what i want.
the lines look something like this:
As you can see the natural sort order is by Index. I want it by Value. And the tool I'm using won't produce a listing in Value order.
I'm using SORT /+9 to sort on the value column. Can TPIPE do this kind of sort?
I have a symbol file that is out of order and very hard to find anything. I want to sort the file so the symbols are listed in increasing numeric order. I am currently using the SORT program that's built in to Windows, however it does a character sort and not a numeric sort so the value of 0xfc would come after 0xfb001234 which is not what i want.
the lines look something like this:
Code:
[Index] Value Size Type Bind Other Shndx Name
[1] 0x0 0 4 0 0 0xfff1 dataSegPad.c
[2] 0xf5004000 0 3 0 0 0x1
[3] 0x0 0 3 0 0 0x9
[4] 0x0 0 1 0 0 0x9 __local_cie
[5] 0x0 0 3 0 0 0xa
[6] 0x0 0 3 0 0 0xb
[7] 0x0 0 3 0 0 0xc
[8] 0x0 0 4 0 0 0xfff1 romfs_image_prj.s
[9] 0xf5004000 0 3 0 0 0x1
[10] 0xf5218d06 0 3 0 0 0x1
[11] 0x0 0 4 0 0 0xfff1 ../../BSP/ARM_926/sysALib.s
[12] 0xf5004000 0 3 0 0 0x1
[13] 0xf5004000 0 2 0 0 0x1 $a
I'm using SORT /+9 to sort on the value column. Can TPIPE do this kind of sort?