Sort xdebug output

0

I have a xdebug function trace output that looks like this:

 1130.8156  482236096     -160               -> memory_get_usage()
 1130.8156  482236112      +16               -> X
 1130.8157  482236112       +0                 -> Y
 1130.8157  482236328     +216                 -> Z
 1130.8157  482236200     -128               -> X
 1130.8157  482236280      +80                 -> X
 1130.8157  482236360      +80                   -> X
 1130.8157  482236440      +80                     -> X
 1130.8158  482237488    +1048                     -> X

I want to sort by the third column (-160,-128,0 ...)

sort -n -k3

is not working.

Alex

Posted 2011-09-21T07:04:26.340

Reputation: 1 067

Looks like I have to use the -g option:

sort -k3 -g test.txt
 – Alex  – 2011-09-21T07:21:32.120

Answers

1

Looks like I have to use the -g option: sort -k3 -g test.txt

Alex

Posted 2011-09-21T07:04:26.340

Reputation: 1 067